Visually hidden

A utility that hides content from the screen while retaining readability by screen readers for accessibility.

Installation

Package installation information
Installyarn add @atlaskit/visually-hidden
SourceBitbucket.org, (opens new window)
npm@atlaskit/visually-hidden, (opens new window)
Bundleunpkg.com, (opens new window)

Props

children

Required
Description

The element or elements that should be hidden.

Typestring | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal

id

Description

An id may be appropriate for this component if used in conjunction with aria-describedby on a paired element.

Typestring

role

Description

An ARIA role attribute to aid screen readers.

Typestring

testId

Description

A testId prop is provided for specified elements, which is a unique string that appears as a data attribute data-testid in the rendered code, serving as a hook for automated tests.

Typestring
Was this page helpful?
We use this feedback to improve our documentation.
© 2026 AtlassianTrademark, (opens new window)Privacy, (opens new window)License