ComponentsModel Selector

Model Selector

A compact AI model dropdown with sizes, radius presets and optional search.

Preview

Installation

  1. 1

    Run the following command

    npx shadcn@latest add https://localhostui.com/r/models-selector.json
    

Props

PropTypeDefaultDescription
modelsModelOption[]defaultModelsList of models to choose from. Each option has an id, label, icon and optional description.
defaultValuestring—Uncontrolled initial selection, used when value isn't passed.
valuestring—Controlled selected model id.
onChange(id: string, model: ModelOption) => void—Fired with the newly selected model id and option.
openboolean—Controlled open state. Omit to let the component manage it.
onOpenChange(open: boolean) => void—Called when the panel opens or closes.
widthnumber | string—Trigger width. Numbers are px; strings are any CSS length.
heightnumber | string—Trigger height. Numbers are px; strings are any CSS length.