Screen reader
.sr-only / .visually-hidden
A small, intentional set of helpers — display, flex, text, overflow, width, and screen reader. Spacing lives on Spacing; this is not a full utility framework.
Categories shipped in src/css/components/utilities.css.
.sr-only / .visually-hidden
.d-none, .d-block, .d-flex,
.d-grid, .d-inline, .d-inline-flex,
.d-sm-none, .d-sm-block (≥640px)
.flex-row, .flex-column, .flex-wrap,
.items-center (default for icon+text),
.items-baseline (mixed type),
.items-start (wrapping labels),
.items-end (layout feet only),
.justify-between, .justify-center,
.flex-1, .flex-shrink-0
.text-start, .text-center, .text-end,
.text-truncate, .text-muted,
.fw-semibold, .fw-bold
.overflow-hidden, .overflow-auto,
.w-full, .w-auto, .min-w-0
Components that pair icons with a single line of text default to
align-items: center (buttons, badges, chips, links, cluster). Use
.items-baseline when mixed font sizes must share a text line,
.items-start when a control sits beside wrapping copy, and
.items-end only to pin content to the bottom of a tall container — not as
a default for inline text.
.d-flex.items-center — icon + label.
.items-baseline — mixed type sizes.
.items-start — control + wrapping text.
Live
Muted supporting copy via .text-muted.
Truncated: a long line that should ellipsis when space runs out.
Visible label plus screen-reader-only detail for assistive tech
<div class="d-flex items-center justify-between w-full">
<span class="fw-semibold">Toolbar</span>
…
</div>
<p class="text-muted">Supporting copy</p>
<span class="sr-only">Screen reader only</span>
{/* CSS-only — apply className strings */}
<div className="d-flex items-center justify-between w-full">
<span className="fw-semibold">Toolbar</span>
</div>
<p className="text-muted">Supporting copy</p>
<span className="sr-only">Screen reader only</span>
.d-flex + .items-center + .gap-2 (gap from
Spacing).
.d-flex + .flex-column.
Logical start / center / end.
Start
Center
End
.fw-semibold (600) and .fw-bold (700).
Semibold label
Bold emphasis
.d-sm-none hides from 640px up; .d-sm-block shows then.
Lets flex children shrink and truncate instead of overflowing.
.sr-only / .visually-hidden for text that must stay in
the accessibility tree but not on screen (e.g. icon-button names, extra context).
.d-none for content that should remain available to assistive
tech — hidden with display: none is removed from the a11y tree.
.text-start / .text-end use logical alignment and stay
RTL-safe.
| Class | Description |
|---|---|
.sr-only / .visually-hidden |
Clip pattern — visually hidden, available to AT. |
.d-none … .d-grid |
Display values (none, inline, block, flex, inline-flex, grid). |
.d-sm-none / .d-sm-block |
Display overrides from min-width: 640px. |
.flex-* / .items-* / .justify-* |
Flex direction, wrap, alignment, grow, shrink. |
.text-* / .fw-* |
Alignment, truncate, muted color, font weight. |
.overflow-* |
hidden or auto. |
.w-full / .w-auto / .min-w-0 |
Width helpers for full, auto, and flex truncation. |
CSS-only — no React wrappers. Pass class names via className.