Aurora AI Model Selector
aurora-dinglebear-ai/aurora-ai-model-selectorFreeBlock
Aurora-native model selector parity surface from AI Elements.
Install it
npx shadcn@latest add https://aurora.dinglebear.ai/r/aurora-ai-model-selector.jsonSource
1"use client"23import * as React from "react"4import { Cpu } from "lucide-react"56import { cn } from "@/lib/utils"7import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from "@/registry/aurora/ui/select"89export interface ModelSelectorProps extends React.HTMLAttributes<HTMLDivElement> {10 models: string[]11 value?: string12 defaultValue?: string13 onValueChange?: (value: string) => void14 label?: string15 description?: string16 name?: string17 disabled?: boolean18 required?: boolean19 triggerId?: string20 triggerLabel?: string21 placeholder?: string22}2324const ModelSelector = (25 { ref,26 models,27 value,28 defaultValue,29 onValueChange,30 label = "Model",31 description = "Select a model for this conversation.",32 name,33 disabled,34 required,35 triggerId,36 triggerLabel,37 placeholder,38 className,39 style,40 ...props41 }: ModelSelectorProps & { ref?: React.Ref<HTMLDivElement> }42 ) => {43 const reactId = React.useId()44 const descriptionId = description ? `${reactId}-description` : undefined45 const fallbackValue = models[0]4647 return (48 <div49 ref={ref}50 className={cn("grid gap-3 border p-3", className)}51 style={{52 background: "var(--aurora-surface-raised)",53 borderColor: "var(--aurora-border-strong)",54 borderRadius: "var(--aurora-radius-1)",55 boxShadow: "var(--aurora-shadow-medium), var(--aurora-highlight-medium)",56 ...style,57 }}58 {...props}59 >60 <div className="grid gap-1">61 <div62 className="flex items-center gap-2 aurora-text-label"63 style={{ color: "var(--axon-orange)", fontWeight: "var(--aurora-weight-heading)" }}64 >65 <Cpu className="size-3.5" aria-hidden style={{ color: "var(--axon-orange)" }} />66 {label}67 </div>68 <p id={descriptionId} className="aurora-text-meta" style={{ margin: 0 }}>69 {description}70 </p>71 </div>72 <Select73 value={value}74 defaultValue={defaultValue ?? fallbackValue}75 onValueChange={onValueChange}76 name={name}77 disabled={disabled || models.length === 0}78 required={required}79 >80 <SelectTrigger81 id={triggerId}82 aria-label={triggerLabel ?? label}83 aria-describedby={descriptionId}84 className="h-10 rounded-[10px]"85 >86// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from aurora
All 176 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Aurora AI Actionaurora-ai-action | aurora | Blocks | Free | 1 dep | |
| Aurora AI Actionsaurora-ai-actions | aurora | Blocks | Free | 1 dep | |
| Aurora AI Agentaurora-ai-agent | aurora | Blocks | Free | 1 dep | |
| Aurora AI Image Gridaurora-ai-ai-image-grid | aurora | Blocks | Free | 1 dep | |
| Aurora AI Attachmentsaurora-ai-attachments | aurora | Blocks | Free | 1 dep | |
| Aurora AI Audio Playeraurora-ai-audio-player | aurora | Blocks | Free | 1 dep | |
| Aurora AI Branchaurora-ai-branch | aurora | Blocks | Free | 1 dep | |
| Aurora AI Canvasaurora-ai-canvas | aurora | Blocks | Free | 1 dep |
