VisuallyHidden
▸ VisuallyHidden(props
): null
| ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Renders an element that is visually only to screen readers
Parameters
Name | Type |
---|---|
props | VisuallyHiddenProps & RefAttributes <HTMLDivElement (opens in a new tab)> |
Example
example.tsx
<a href="#">
Learn more<VisuallyHidden> about brazilian beaches</VisuallyHidden>
</a>
import React from 'react' import { VisuallyHidden } from '@vtex/shoreline-components' export default function App () { return ( <> <a href='#'> Learn more<VisuallyHidden> about brazilian beaches</VisuallyHidden> </a> </> ) }