True Focus Scope
A production-scale, light + dark True Focus Scope component. Copy-paste via the CLI; you own the code.
npx lerpa-cli add true-focus-scopeLive preview available in the gallery.
Usage
import { TrueFocusScope } from "@lerpa/ui";
<TrueFocusScope />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| targets | FocusScopeTarget[] | - | |
| activeTargetId | string | null | - | |
| onTargetChange | (id: string | null) => void | - | |
| showOverlay | boolean | — | |
| children | React.ReactNode | - |
Accessibility
- Keyboard accessible interactive elements.
- Respects prefers-reduced-motion where animated.
- Color is never the only signal.