PromptInputModelSelect
Selector for the active AI model. Options are typed (PromptInputModelOption[]) with id, label, description, badge, and disabled. Two-way bindable value.
Basic usage
typescript
const MODELS = [
{ id: 'claude-opus-4-7', label: 'Claude Opus 4.7', description: 'Highest quality', badge: 'flagship' },
{ id: 'claude-sonnet-4-6', label: 'Claude Sonnet 4.6', description: 'Balanced' },
{ id: 'claude-haiku-4-5', label: 'Claude Haiku 4.5', description: 'Fastest, cheapest' },
] satisfies PromptInputModelOption[];
@Component({
template: `
<prompt-input-model-select
[options]="models"
[(value)]="selectedModel"
placeholder="Choose model"
/>
`,
})
export class Chat {
models = MODELS;
selectedModel = signal<string | null>('claude-sonnet-4-6');
}API — Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| options | readonly PromptInputModelOption[] | (required) | Available options. |
| value | string | null | null | Selected option id. Two-way bindable. |
| placeholder | string | 'Choose model' | Shown when value is null. |
| disabled | boolean | false | Disable independently of parent. |
| ariaLabel | string | 'Select model' | Accessible label. |
PromptInputModelOption
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier matched against value. |
| label | string | Visible label. |
| description | string? | Secondary text under the label. |
| badge | string? | Small uppercase tag (e.g. "flagship"). |
| disabled | boolean? | When true, option is shown but not selectable. |
Accessibility
- Trigger has
aria-haspopup="listbox"andaria-expanded - Open panel has
role="listbox"; each option hasrole="option"andaria-selected - Disabled options are skipped on click
- v0.1 note: typeahead and full combobox keyboard pattern pending. Migration to
@spartan-ng/brain/selectplanned for v0.2.