Skip to Content
zjkm-ui-ai-elements

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.

Loading preview…

Installation

npm i zjkm-ui-ai-elements
import {  ModelSelector,  ModelSelectorTrigger,  ModelSelectorContent,  ModelSelectorDialog,  ModelSelectorInput,  ModelSelectorList,  ModelSelectorEmpty,  ModelSelectorGroup,  ModelSelectorItem,  ModelSelectorShortcut,  ModelSelectorSeparator,  ModelSelectorLogo,  ModelSelectorLogoGroup,  ModelSelectorName,} from "zjkm-ui-ai-elements/model-selector";

First time? Add the package's styles: see Setup.

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
  • 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

On this page