Skip to content

Invisible

The Invisible component is used to visually hide content while keeping it accessible to screen readers and other assistive technologies. This is useful for accessibility purposes, such as providing descriptive text for icon-only buttons.

import { Invisible } from '@fintech-sandpit/ui/react';
import { Button } from '@fintech-sandpit/ui/react';
import { Icon } from '@fintech-sandpit/ui/react';
import { faCheck } from '@fortawesome/free-solid-svg-icons';
// Icon-only button with accessible text
<Button>
<Icon as={faCheck} boxSize="1em" />
<Invisible>Submit form</Invisible>
</Button>
NameTypeDefaultDescription
asChildbooleanfalseWhether to render the invisible component as a child