Model Selector
A compact menu to pick the model, or how hard it thinks, right next to the prompt.
NewInstallation
Copy and paste the following code into your project.
Update the import paths to match your project structure.
Anatomy
It is a Select with a quiet trigger and items that carry a description. The trigger shows only the model name; the list explains each option, so the choice is informed without crowding the composer. Use a second
ModelSelector for effort or reasoning level: it is the same control with other options.Composition
In the prompt input
Put it in
PromptInput.Tools, after the attachment button.Keyboard
Same as Select:
Enter, Space or the arrows open the list, the arrows move, typing jumps to a model by name, Enter picks and Escape closes and returns focus to the trigger.Accessibility
- Name every trigger with
aria-label("Model", "Effort"); its visible text is the current value, not what the control is for. - The description is part of the option's accessible name, so a screen reader hears "Lite, Fastest, for quick answers".
API Reference
ModelSelector takes every Select prop (value, defaultValue, onValueChange, open, name, disabled). ModelSelector.Trigger takes the Select trigger props and defaults to size="sm".ModelSelector.Item
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | - | Value reported when the model is picked |
children | string | - | Model name, also shown in the trigger |
description | ReactNode | - | One line under the name |
badge | ReactNode | - | Small tag next to the name, like "New" |
disabled | boolean | false | Skips the item and blocks selection |
Found something to improve?
Notice a bug, typo, or missing detail on this page? Help us make the documentation better by opening a GitHub issue.