Model Selector

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

Installation

pnpm dlx shadcn-svelte@latest add https://svelte-ai-elements.vercel.app/r/model-selector.json

If you prefer using jsrepo, please install via the command below:

pnpm dlx jsrepo add @ai/elements/ai-elements/model-selector

Examples

With Dialog

Select AI Model
Choose a model to use

Props

ModelSelector

NameTypeDefault
open
boolean
children
Snippet

ModelSelectorDialog

NameTypeDefault
open
boolean
title
string "Model Selector"
description
string "Search for a model"
children
Snippet
NameTypeDefault
provider
string
class
string

ModelSelectorGroup

NameTypeDefault
heading
string
children
Snippet

ModelSelectorItem

NameTypeDefault
value
string
onSelect
() => void
children
Snippet