ComponentsModel Picker

Model Picker

A searchable AI model picker with provider icons, smooth motion and full keyboard navigation.

Preview

Basic

Advanced

Installation

  1. 1

    Run the following command

    npx shadcn@latest add https://localhostui.com/r/model-picker.json
    

Props

ModelPicker

PropTypeDefaultDescription
models*AIModel[]—Full list of selectable models.
selectedModelId*string | null—Currently selected model id (controlled).
onSelectModel*(model: AIModel) => void—Called when the user picks a model.
searchPlaceholderstring—Placeholder text for the search field.
searchValuestring—Controlled search value.
onSearchChange(value: string) => void—Called on search value change (component manages its own state if omitted).
sectionLabelsPartial<Record<ModelTier, string>>—Labels for each section header.
classNamestring—Extra classes on the outer panel.
maxListHeightnumber | string—Max height of the scrollable list area.
enableTiltEffectboolean—Enable the coverflow-style scale/tilt effect on the centered row while scrolling.

AIModel

PropTypeDefaultDescription
id*string—Stable unique id, e.g. "claude-sonnet-4-6"
name*string—Display name, e.g. "Claude Sonnet 4.5"
tier*ModelTier—Section this model is grouped under.
icon*React.ReactNode—Icon renderer, sized by the list row.
iconClassNamestring—Icon color, any Tailwind text color class.
disabledboolean—Disable a specific row (e.g. not available on current plan).
descriptionstring—Optional short description, used as an aria-description.