#010
Basic
A searchable Combobox over eight frameworks that prints the selected value below the field.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Basic" pattern (@codeatlasdev/ui demo #010, inputs/combobox) in my app.
Call get_demo({ ids: ["#010"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Picking one item from a long list where typing to filter is faster than scrolling a select.
Keep these library parts, with the props and tokens the demo uses:
- Combobox from "@codeatlasdev/ui"
Behaviour to keep:
- `<Combobox label="Framework" options={frameworks} bind:value={selected} />`
- `const frameworks` has 8 options with `value` and `label` keys, from `svelte` to `sveltekit`
- `let selected = $state('')` starts empty
- `{#if selected}` renders `Selected:` with the value in `<code>`
- Wrapper `.col` has `max-width: 320px`
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
- Combobox
@codeatlasdev/ui
How it is built
- `<Combobox label="Framework" options={frameworks} bind:value={selected} />`
- `const frameworks` has 8 options with `value` and `label` keys, from `svelte` to `sveltekit`
- `let selected = $state('')` starts empty
- `{#if selected}` renders `Selected:` with the value in `<code>`
- Wrapper `.col` has `max-width: 320px`
Related
Loading source.