Model Selector

Searchable AI model picker (`ModelSelector`) that morphs open from its trigger with models grouped by provider, generic geometric provider glyphs, vision/tools/reasoning/fast capability badges, context size, relative cost dots, a New tag and a gliding active row with full keyboard navigation; a richer standalone alternative to PromptInput's compact model select, controlled or uncontrolled.

Preview

Model Selector preview width

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @karaui/model-selector
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

API Reference

ProviderGlyph

provider?
ModelProvider
—
index?
number
0
className?
string
—

ModelSelector

models
ModelOption[]
—
providers?
ModelProvider[]

Provider order and naming. Providers missing here are derived from `models`.

—
value?
string
—
defaultValue?
string
—
onValueChange?
((value: string) => void)
—
open?
boolean
—
defaultOpen?
boolean
false
onOpenChange?
((open: boolean) => void)
—
placeholder?
string
Choose a model
searchPlaceholder?
string
Search models…
emptyMessage?
ReactNode
No models match your search.
side?
"bottom" | "top"
bottom
align?
"end" | "start"
start
disabled?
boolean
false
hideHints?
boolean

Hide the keyboard hint footer.

false
className?
string
—
triggerClassName?
string
—
contentClassName?
string
—
aria-label?
string
Model

Updated