Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@accessible/visually-hidden

2.0.0 • Public • Published

<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

Install

npm i @accessible/visually-hidden

DownloadsWeekly Downloads

46

Version

2.0.0

License

MIT

Unpacked Size

21.4 kB

Total Files

27

Last publish

Collaborators

  • avatar