Component API
Visually Hidden
Using the VisuallyHidden component will hide the children of this component visually, while still allowing the content to be accessed by screenreaders.
Basic Usage
import React from 'react';import { VisuallyHidden } from 'react-magma-dom';export function Example() {return (<VisuallyHidden>This text can be read by a screen reader, but does not appear on thescreen.</VisuallyHidden>);}
Visually Hidden Props
This component uses forwardRef. The ref is applied to the outer div element.
All of the global HTML attributes can be provided as props and will be applied to the wrapping div element that gets rendered.
= required prop
| Property | Type | Default | Description | 
|---|---|---|---|
| children Required | ReactNode | undefined | - | The content of the component | 
| testId | string | - | Test ID attached to an internal element as `data-testid` for consumer testing |