Model picker
A compact menu for choosing which model answers.
When to use
- Letting the user trade speed for quality.
- Showing a short description beside each model.
When not to use
- There is only one model.
Installation
terminal
pnpm dlx shadcn@latest add @caliper/model-picker
Adds its 4 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
ModelPicker
7 props
PropTypeDefault
models *readonly ModelOption[]—
value *string—
onValueChange *(id: string) => void—
effortstring—
onEffortChange((effort: string) => void)—
labelstring"Model"
classNamestring—
Keyboard
- ↓
- Moves to the next item or value.
- ↑
- Moves to the previous item or value.
- Home
- Jumps to the first item or the minimum.
- End
- Jumps to the last item or the maximum.
- Enter
- Activates the focused control.
- Space
- Activates the focused control.
Accessibility
It exposes img, listbox, presentation and option semantics, with aria-label, aria-hidden, aria-activedescendant, aria-selected and aria-disabled kept in step with state.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/model-picker.mdThe index of every part is at /llms.txt.