Model Selector
A compact AI model dropdown with sizes, radius presets and optional search.
Preview
Claude Sonnet 5
Claude Sonnet 5
Claude Sonnet 5
Claude Sonnet 5
Claude Sonnet 5
Claude Sonnet 5
Claude Sonnet 5
Claude Sonnet 5
Claude Sonnet 5
Claude Sonnet 5
Claude Sonnet 5
Claude Sonnet 5
Claude Sonnet 5
Claude Sonnet 5
Claude Sonnet 5
Claude Sonnet 5
Claude Sonnet 5
Installation
- 1
Run the following command
npx shadcn@latest add https://localhostui.com/r/models-selector.json
Props
| Prop | Type | Default | Description |
|---|---|---|---|
models | ModelOption[] | defaultModels | List of models to choose from. Each option has an id, label, icon and optional description. |
defaultValue | string | — | Uncontrolled initial selection, used when value isn't passed. |
value | string | — | Controlled selected model id. |
onChange | (id: string, model: ModelOption) => void | — | Fired with the newly selected model id and option. |
open | boolean | — | Controlled open state. Omit to let the component manage it. |
onOpenChange | (open: boolean) => void | — | Called when the panel opens or closes. |
width | number | string | — | Trigger width. Numbers are px; strings are any CSS length. |
height | number | string | — | Trigger height. Numbers are px; strings are any CSS length. |