#033
States
Four PinInput states: with description, with error, disabled with a partial value, and a text-type five-character key.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "States" pattern (@codeatlasdev/ui demo #033, inputs/pin-input) in my app.
Call get_demo({ ids: ["#033"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Documenting helper text, error feedback and non-numeric code variants of one-time code inputs.
Keep these library parts, with the props and tokens the demo uses:
- PinInput from "@codeatlasdev/ui"
Behaviour to keep:
- `description="Check your email."` with `bind:value={hinted}` starting at `$state('123')`
- `error="Invalid or expired code."` with `value="123456"`
- `disabled` with `value="12"`
- `<PinInput label="Access key" type="text" length={5} value="" />`
Reduced motion: the demo handles it; keep that branch.
Keyboard: operable; keep the focus order and key handling.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- PinInput
@codeatlasdev/ui
How it is built
- `description="Check your email."` with `bind:value={hinted}` starting at `$state('123')`
- `error="Invalid or expired code."` with `value="123456"`
- `disabled` with `value="12"`
- `<PinInput label="Access key" type="text" length={5} value="" />`
Related
Loading source.