Skip to main content
  1. Docs
  2. Components
  3. Type

Visually hidden

Content for screen readers only: read, never shown. Never display: none.

Import
@qeetrix/react
Status
StableSince 0.0.2
Renders
<span>Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

Import

visually-hidden.tsx
// From the package: a build keeps only what it uses.
import { VisuallyHidden } from "@qeetrix/react";

// Or from its own path.
import { VisuallyHidden } from "@qeetrix/react/visually-hidden";

02

Props

And every native attribute of the element it renders.

PropTypeDefaultWhat it does
childrenReactNode—What's read.
renderReactElementa <span>Another element: a <div> around a block.

03

Parts

Each part carries a data-slot, for tests and placement.

data-slotElementWhat it is
visually-hidden<span>Clipped to 1px.

04

Not for focusable content

Something focusable shouldn't hide: a Skip link shows itself when focused.

skip.tsx
<SkipLink />
Next — Visually hiddenAccessibility