Components
VisuallyHidden
Code

VisuallyHidden

VisuallyHidden(props): null | ReactElement<any, string | JSXElementConstructor<any>>

Renders an element that is visually only to screen readers

Parameters

NameType
propsVisuallyHiddenProps & RefAttributes<HTMLDivElement (opens in a new tab)>

Returns

null | ReactElement<any, string | JSXElementConstructor<any>>

Example

<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></>)}

Defined in

node_modules/.pnpm/@types+react@18.2.14/node_modules/@types/react/ts5.0/index.d.ts:355