Chatbot

Model Selector

A searchable command palette for selecting AI models in your chat interface.

The ModelSelector component provides a searchable command palette interface for selecting AI models. It's built on top of the cmdk library and provides a keyboard-navigable interface with search functionality.

Installation

npx ai-elements@latest add model-selector

Features

  • Searchable interface with keyboard navigation
  • Fuzzy search filtering across model names
  • Grouped model organization by provider
  • Keyboard shortcuts support
  • Empty state handling
  • Customizable styling with Tailwind CSS
  • Built on cmdk for excellent accessibility
  • Support for both inline and dialog modes
  • TypeScript support with proper type definitions

Props

<ModelSelector />

Prop

Type

<ModelSelectorTrigger />

Prop

Type

<ModelSelectorContent />

Prop

Type

<ModelSelectorDialog />

Prop

Type

<ModelSelectorInput />

Prop

Type

<ModelSelectorList />

Prop

Type

<ModelSelectorEmpty />

Prop

Type

<ModelSelectorGroup />

Prop

Type

<ModelSelectorItem />

Prop

Type

<ModelSelectorShortcut />

Prop

Type

<ModelSelectorSeparator />

Prop

Type

<ModelSelectorLogo />

Prop

Type

<ModelSelectorLogoGroup />

Prop

Type

<ModelSelectorName />

Prop

Type