Skip to content

🅰 A React component for adding visually hidden styles to elements

License

Notifications You must be signed in to change notification settings

accessible-ui/visually-hidden

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


<VisuallyHidden>

Bundlephobia Types Code coverage Build status NPM Version MIT License

npm i @accessible/visually-hidden

A React component for adding visually hidden styles to elements

Quick Start

Simply wrap a child element that accepts a style prop and this component will add visually hidden styles to it without overwriting styles already present on the child.

// VisuallyHidden is the component
// visuallyHidden is a style object
import {VisuallyHidden, visuallyHidden} from '@accessible/visually-hidden'

export default (props) => (
  <VisuallyHidden>
    <input type='checkbox' {...props} />
  </VisuallyHidden>
)
// <input type='checkbox' style='...'/>

LICENSE

MIT

About

🅰 A React component for adding visually hidden styles to elements

Resources

License

Stars

Watchers

Forks

Packages

No packages published