Skip to content
Visually Hidden utility plugin for tailwindcss framework
Branch: master
Clone or download
Latest commit ae86973 Jan 17, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore [Added] Initial commit Mar 21, 2018 Typo Mar 28, 2018
index.js Add not-visuallyhidden class Jan 15, 2019
package-lock.json 1.0.2 Jan 17, 2019
package.json 1.0.2 Jan 17, 2019

Visually Hidden Utility Tailwind Plugin


Hide only visually, but have it available for screen readers:

For long content, line feeds are not interpreted as spaces and small width causes content to wrap 1 word per line:


Add this plugin to your project:

# Install via npm
npm install --save-dev tailwindcss-visuallyhidden


You can add the plugin to your tailwind config as follows:


This plugin outputs the following

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    white-space: nowrap; /* 1 */

.visuallyhidden.focusable:focus {
    clip: auto;
    clip-path: none;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
    white-space: inherit;

As per the tailwind plugin docs you are able to pass variants (responsive, hover etc) as a parameter.

  variants: ['responsive', 'hover'],
You can’t perform that action at this time.