Qeetrix

Spoiler

Truncates content to `maxLines` with an inline show-more/less toggle (Disclosure).

Usage

Import

import { Spoiler } from "@qeetrix/ui";

It can also be imported on its own from @qeetrix/ui/components/spoiler.

Controlled and uncontrolled

Pass the value prop to control it, or the default prop to let the component own it.

ValueDefaultChange
expandeddefaultExpandedonExpandedChange

States

hover · focus-visible · expanded

Support

FeatureStatus
Right-to-leftNot applicable
Dark modeSupported
DensityNot applicable
Server renderingClient component
Reduced motionSupported

Accessibility

Follows the WAI-ARIA disclosure pattern. Audited.

CheckResult
SemanticsPass
Accessible namePass
KeyboardPass
FocusPass
Screen readerPass
Right-to-leftNot applicable
Reduced motionNot applicable
Forced coloursPass
ContrastPass

Keyboard

Tab Enter Space

Focus

Each control is a Tab stop, in order.

Tests

Covered by unit, accessibility (axe), interaction and visual tests.