Weftv0.4.0
GitHubFigma
Blade AI
Inputs · Selectstable

Select

Lets people pick one option from a short, known list. A trigger opens a menu of options; the choice shows in the trigger.

Preview

#preview

Pick validation, size and state; Show code opens the React and CSS below.

Model
Blade Swift
Blade Lite
Blade Pro
Blade Max
Blade Max Ultra · Enterprise
Used for new chats in this workspace.
model-select.tsx
import { Select, SelectGroup, SelectLabel, SelectItem, SelectSeparator } from "@blade-ai/weft/components/select";
import { useState } from "react";

export function ModelSelect() {
  const [model, setModel] = useState("blade-pro");

  return (
    <Select
      label="Model"
      placeholder="Select a model"
      size="medium"
      validationState="none"
      helpText="Used for new chats in this workspace."
      value={model}
      onValueChange={setModel}
      isRequired
    >
      <SelectGroup><SelectLabel>Fast</SelectLabel>
        <SelectItem value="blade-swift">Blade Swift</SelectItem>
        <SelectItem value="blade-lite">Blade Lite</SelectItem>
      </SelectGroup>
      <SelectSeparator />
      <SelectGroup><SelectLabel>Reasoning</SelectLabel>
        <SelectItem value="blade-pro">Blade Pro</SelectItem>
        <SelectItem value="blade-max">Blade Max</SelectItem>
        <SelectItem value="blade-max-ultra" isDisabled>Blade Max Ultra · Enterprise</SelectItem>
      </SelectGroup>
    </Select>
  );
}

All states

#all-states

Every state from the Select states tables, named and shown at size medium.

SelectTrigger · 10 states · size medium
Select a model
Default
Blade Pro
Filled
Blade Pro
Hover
Blade Pro
Focus
Blade Pro
Open
Select a model
Disabled
Blade Pro
Read-only
Blade Pro
Loading
Select a model
Invalid
Blade Pro
Success
SelectItem and SelectContent parts · 9 states
Blade Lite
Default
Blade Lite
Hover
Blade Pro
Selected
Blade Max
Disabled
Blade ProBest for long documents
With description
Blade Pro
With icon
Models
Group label
Divider
No models found
Empty

Props

#props

Select wraps Field, so label, help and validation props live on Select. * = required.

Prop
Type
Default
Description
label *
string
—
Accessible name of the trigger.
labelPosition
"top" | "left"
"top"
left = 120px label column.
placeholder
string
"Select…"
Shown when value is empty.
value · defaultValue · onValueChange
string · (value: string) => void
—
Single value only. Multi-select: use Combobox.
size
"small" | "medium" | "large"
"medium"
Trigger height 32 / 36 / 48. Menu options stay 32px on desktop.
validationState
"none" | "success" | "error"
"none"
error sets aria-invalid and shows errorText.
helpText · successText · errorText
string
—
One message at a time.
isRequired · isDisabled · isLoading
boolean
false
isLoading swaps the chevron for a spinner and sets aria-busy.
isReadOnly
boolean
false
Tokens UNDEFINED · needs decision
isOpen · defaultOpen · onOpenChange
boolean · (open: boolean) => void
false
Controlled open state.
position
"popper" | "item-aligned"
"popper"
Predictable placement and flip.
name
string
—
Hidden native select for form submit.
SelectItem: value * · isDisabled · description · icon · textValue
string · boolean · string · IconComponent · string
isDisabled false
textValue feeds typeahead.

Usage

#usage

When to reach for Select, and the mistakes that break it.

Do
Use Select for 5–15 known options; Radio group for 2–4; Combobox for long, searchable or multi-select lists.
Always show a visible label; the placeholder invites a choice (“Select a model”).
Order options logically and group them with SelectLabel when it helps.
Bind only Theme and Global token names; no component tokens.
Use the Drawer and size large on mobile.
Don’t
Put the label or instructions in the placeholder.
Mark the selected option with colour alone; keep the check and aria-selected.
Hide disabled options or let the keyboard land on them.
Use sentences, mixed formats or “Other” at the top of the list.
Round the corners or add raw colours to the trigger, menu or options.

Accessibility

#accessibility

Select-only combobox pattern (WAI-ARIA APG). Roving focus via Radix; aria-activedescendant is not used.

Keyboard
Key
Closed (focus on trigger)
Open (focus in listbox)
↓ / ↑
Opens; highlights selected (or first / last).
Moves highlight one enabled option; no wrap.
Home / End
Opens and highlights first / last.
Highlights first / last enabled option.
Enter / Space
Opens.
Selects highlighted option, closes, focus to trigger.
Esc
No action.
Closes without change, focus to trigger.
Tab / Shift+Tab
Moves focus to next / previous field.
Closes without selecting and moves focus.
A–Z (typeahead)
Selects next matching option without opening.
Highlights next matching option.
PageUp / PageDown
—
UNDEFINED · needs decision (jump 10 options?)
ARIA
Element
Attributes
Notes
SelectTrigger
role="combobox" · aria-haspopup="listbox" · aria-expanded · aria-controls → listbox id · aria-labelledby → label
Select-only combobox (no text input).
Trigger state
aria-invalid · aria-describedby → help / error · aria-required · aria-busy · disabled
From validationState, isRequired, isLoading, isDisabled.
SelectContent
role="listbox" · id · aria-labelledby → label
Rendered in a portal.
SelectItem
role="option" · aria-selected · aria-disabled · data-highlighted
Check icon aria-hidden.
SelectGroup · SelectLabel
role="group" · aria-labelledby → SelectLabel id
—
SelectSeparator · empty
role="separator" (aria-hidden) · empty: role="status"
—

Use with AI

#use-with-ai

Give your coding agent the Select spec. Pick how your agent connects.

Best for Claude Code, Cursor and other MCP clients. Your agent always gets the latest spec.
.mcp.json
{ "mcpServers": { "weft": { "command": "npx", "args": ["-y", "@blade-ai/weft", "mcp"] } } }