#057
With icons
Search field with a leading icon and a revealable password field.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "With icons" pattern (@codeatlasdev/ui demo #057, inputs/text-field) in my app.
Call get_demo({ ids: ["#057"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Search boxes and password inputs that need an inline icon or action.
Keep these library parts, with the props and tokens the demo uses:
- TextField from "@codeatlasdev/ui"
Behaviour to keep:
- Search field uses `{#snippet leading()}` with `<Search size={16} stroke-width={2} />`
- Password field is `type="password"` with `revealable`: the component renders the show/hide eye button
- No local reveal state in the demo
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
- TextField
@codeatlasdev/ui
How it is built
- Search field uses `{#snippet leading()}` with `<Search size={16} stroke-width={2} />`
- Password field is `type="password"` with `revealable`: the component renders the show/hide eye button
- No local reveal state in the demo
Related
Loading source.