Face ID
betaA Face ID glyph whose scan line sweeps while the face shifts expression, then morphs into a check on success.
- Feedback
- 1 file
- 1 npm package
- Accessibility notes
Loading the example…
pnpm dlx @dowel-ui/cli add face-idnpm packages installed: class-variance-authority.
import { FaceId } from "@/components/ui/face-id";Default
Demo
States
<FaceId>
| Prop | Type | Default |
|---|---|---|
hideLabelHide the caption visually. It is still announced. | boolean | false |
labelsOverride the caption for any state, e.g. | Partial<Record<FaceIdStatus, string>> | — |
size | "sm" | "md" | "lg" | "md" |
statusWhere the check is. Drive it from your authentication flow. | FaceIdStatus | "idle" |
Plus every attribute of <div> except children.
The root is role="status", so its caption ("Face ID", "Scanning", "Unlocked", "Not recognized") is announced politely each time `status` changes; `hideLabel` hides the caption visually but keeps it announced. The glyph is aria-hidden decoration and never the only signal: the caption always names the state. Under reduced motion the scan line stops and every state change lands on its final frame without the sweep, morph or shake.
8/8
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — does not apply
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — passes
- className merged — passes
- Visible focus — does not apply
- No fixed widths — passes