Let the user pick which LLM or model to use for a run: provider logos, context size, price, speed and what each model is good at - searchable, grouped by provider, all by keyboard.
On this page
Examples
Installation
Installation is part of Pro
Pro components install from a licensed registry. The live preview stays open to everyone.
Props
- models
ModelOption[]- { id, name, provider, description?, context?, price?: { input, output } (USD per 1M), speed?: "fast" | "balanced" | "deep", tags?, badge?, disabled?, disabledReason? }. Grouped by provider in your order. No vendor numbers are built in.
- value / onValueChange
string / (id, model) => void- The picked model; the picker closes on pick.
- presentation
"popover"|"dialog"- Default
"popover" - Dialog is modal and becomes a bottom sheet below 640px.
- filters
boolean- Default
true when models have tags - Capability chips above the list; several chips narrow to models with all of them.
- icons
Record<id, ReactNode>- Logos for models modelIcon doesn't know (by model id). Others get the provider logo from the name.
- label / size / disabled
string / "sm"|"md" / boolean- Default
"Choose a model" / "md" - Trigger: logo, name and context size of the current model.
- placeholder / emptyText
string / ReactNode- Default
"Search models" / "No models match." - Search matches name, provider, tags and description; name hits rank first.
- ModelList
component- The list without the trigger, for a settings page or your own dialog (same props minus presentation).
- a11y
combobox + listbox- Search box drives a grouped listbox (aria-activedescendant): ↑ ↓, PageUp/PageDown, Ctrl+Home/End, Enter picks, Esc closes. Disabled models are listed but skipped. Numbers are read out in words; the match count is announced.
| Prop | Type | Default | Description |
|---|---|---|---|
| models | ModelOption[] | - | { id, name, provider, description?, context?, price?: { input, output } (USD per 1M), speed?: "fast" | "balanced" | "deep", tags?, badge?, disabled?, disabledReason? }. Grouped by provider in your order. No vendor numbers are built in. |
| value / onValueChange | string / (id, model) => void | - | The picked model; the picker closes on pick. |
| presentation | "popover" | "dialog" | "popover" | Dialog is modal and becomes a bottom sheet below 640px. |
| filters | boolean | true when models have tags | Capability chips above the list; several chips narrow to models with all of them. |
| icons | Record<id, ReactNode> | - | Logos for models modelIcon doesn't know (by model id). Others get the provider logo from the name. |
| label / size / disabled | string / "sm" | "md" / boolean | "Choose a model" / "md" | Trigger: logo, name and context size of the current model. |
| placeholder / emptyText | string / ReactNode | "Search models" / "No models match." | Search matches name, provider, tags and description; name hits rank first. |
| ModelList | component | - | The list without the trigger, for a settings page or your own dialog (same props minus presentation). |
| a11y | combobox + listbox | - | Search box drives a grouped listbox (aria-activedescendant): ↑ ↓, PageUp/PageDown, Ctrl+Home/End, Enter picks, Esc closes. Disabled models are listed but skipped. Numbers are read out in words; the match count is announced. |
When to use
When to use
- Choosing a model where provider, context size, price and speed affect the choice.
- Long model lists that need search, groups and full keyboard use, in a popover or a dialog.
When not to use
- Two or three fixed options with no details: use Segmented Control.
- A generic searchable select for non-model data: use Combobox.
Using with AI
Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:
- Add the Knowns UI Model Picker to my app and wire it to my own data.
- I need choosing a model where provider, context size, price and speed affect the choice. Set that up with the Knowns UI Model Picker.
- Which Model Picker props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "model-picker" }) and search_docs({ query: "model picker" }). Pro props, full examples and source come back once your license key is in the MCP config.