Weftv0.4.0
GitHubFigma
Blade AI
Inputs · Chipstable

Chip

Lets people pick one option (single, radio behaviour) or several (multiple, checkbox behaviour) from a short set, most often to filter a list. Two values (unselected, selected), three sizes, intent and an optional leading icon.

Preview

#preview

Switch size, selection type, intent and state. Show code opens the React and CSS below.

Status
single · size medium · intent none · default
status-filter.tsx
import { Chip, ChipGroup } from "@blade-ai/weft/components/chip";

export function StatusFilter({ values, onChange }: Props) {
  return (
    <ChipGroup
      label="Status"
      name="status"
      value={values}
      onChange={({ values }) => onChange(values)}
    >
      <Chip label="Live" value="live" />
      <Chip label="Drafts" value="drafts" />
      <Chip label="Archived" value="archived" />
    </ChipGroup>
  );
}

All states

#all-states

Every state from the Chip spec, named. Medium unless noted.

Chip · 13 states · size medium unless noted
Selected · unselected
Hover · selected
Hover · unselected
Focus-visible
Pressed · unselected
Disabled
Invalid
Positive
Negative
Multiple
Leading icon
Small
Large

Props

#props

Booleans are is-prefixed. ChipGroup owns the selection. Anything marked UNDEFINED is an open decision.

Prop
Type
Default
Description
Chip.label *
string
—
Visible chip text. Keep it to one or two words.
Chip.value *
string
—
Value ChipGroup reports when this chip is selected. Unique within the group.
Chip.accessibilityLabel
string
—
Accessible name when the label is an abbreviation or icon-only. Becomes aria-label.
Chip.leadingIcon
IconComponent
—
Optional icon before the label. Decorative: aria-hidden.
Chip.intent
"none" | "positive" | "negative"
"none"
Tint of the selected chip. Inherits from ChipGroup.
Chip.isDisabled
boolean
false
Native disabled: not focusable, not submitted, 50% opacity. Inherits from ChipGroup.
Chip.isReadOnly
boolean
false
Focusable and submitted, value cannot change. Not in Blade Chip: UNDEFINED · needs decision.
Chip.testID
string
—
Test selector on the chip input (data-testid).
ChipGroup.label
string
—
Legend text that names the group. One of label or accessibilityLabel is required.
ChipGroup.accessibilityLabel
string
—
Group name when there is no visible legend (toolbar filters). Becomes aria-label.
ChipGroup.selectionType
"single" | "multiple"
"single"
single: radio group, one value. multiple: checkbox group, any number.
ChipGroup.value
string | string[]
—
Selected value(s), controlled. string for single, string[] for multiple. Required with onChange when controlled.
ChipGroup.defaultValue
string | string[]
—
Initial selected value(s) when uncontrolled.
ChipGroup.onChange
({ name: string; values: string[] }) => void
—
Fires when the selection changes (click, Space, arrow keys in single). Required when controlled.
ChipGroup.name
string
"auto id"
Form field name shared by every chip. Required for forms.
ChipGroup.size
"small" | "medium" | "large"
"medium"
Chip height 28 / 32 / 36px.
ChipGroup.intent
"none" | "positive" | "negative"
"none"
Tint of selected chips; a chip can override it.
ChipGroup.helpText
string
—
Hint under the group, linked to the fieldset with aria-describedby.
ChipGroup.errorText
string
—
Shown once under the group when validationState is "error"; replaces helpText.
ChipGroup.validationState
"none" | "error"
"none"
"error" gives every chip the red outline (proposal) and sets aria-invalid on the fieldset.
ChipGroup.isDisabled
boolean
false
Disables every chip.
ChipGroup.isRequired
boolean
false
At least one chip selected. Visible marker: UNDEFINED.
ChipGroup.autoFocus
boolean
false
Focuses the selected chip on mount, otherwise the first chip. Not in Blade: UNDEFINED.
ChipGroup.orientation
"horizontal" | "vertical"
"horizontal"
Row that wraps (gap spacing-3) or a column. Not in Blade ChipGroup: UNDEFINED · needs decision.
ChipGroup.testID
string
—
Test selector on the fieldset (data-testid).

Usage

#usage

Short rules for choosing and writing chips.

Do
Use native <input type="radio"> (single) or "checkbox" (multiple) inside a real <label>.
Wrap chips in ChipGroup: fieldset + legend, one name, one value.
Use only the Theme tokens listed under States for colour and Global tokens for size and spacing.
Keep the selected outline (interactive/border/primary/default); fill alone is 1.10:1.
Write 1 to 2 word labels in sentence case, e.g. "Live · Drafts · Archived".
Clear the error as soon as the selection becomes valid.
Don't
Don't add component tokens (chip/bg, chip/border). Add a Theme token or flag UNDEFINED.
Don't use chips for more than about 7 options; use Select or Combobox.
Don't use chips as buttons that run a command (export, delete).
Don't use multiple when the options exclude each other.
Don't show the focus ring on mouse click or hide the input with display:none.
Don't mention any other product name in sample copy; the product is Blade AI.

Accessibility

#accessibility

Native radio group (single) or checkbox group (multiple). Add no key handlers.

Keyboard
Key
Action
Tab / Shift+Tab
single: one tab stop at the selected chip (or the first). multiple: each chip is a tab stop. Disabled skipped.
Arrow keys
single: previous / next chip, moves focus and selects, wraps at the ends. multiple: no effect.
Space
single: selects the focused chip. multiple: toggles it. Ignored when read-only or disabled.
Enter
No change. Submits the surrounding form.
Click
Selects (single) or toggles (multiple) and focuses the chip without a ring.
Home / End
UNDEFINED · needs decision.
ARIA
Element
Role / attribute
When
fieldset
aria-describedby
id of helpText or errorText
fieldset
aria-invalid="true"
validationState = "error"
fieldset
aria-label
accessibilityLabel (no visible legend)
legend
text
ChipGroup label
input
type
"radio" (single) · "checkbox" (multiple)
input
name
ChipGroup name (shared)
input
value
Chip value
input
checked
value is in the group value
input
disabled
isDisabled
input
required
isRequired (single only; multiple validates in JS)
input
aria-label
Chip accessibilityLabel
label
text
Chip label
leading icon
aria-hidden="true"
Always

Agent Spec

#agent-spec

Machine-readable spec, tables (a)–(h). Same source as /specs/chip.json. Anything marked UNDEFINED needs a decision before it is built.

/specs/chip.json·component: "Chip"·package: "@blade-ai/weft"·updated 2026-11-24
[
  "Pressed fill for a selected chip (no Theme token; the hover fill is reused)",
  "Chip.isReadOnly: not in Blade; look and behaviour (gray selected fill proposed)",
  "Per-chip invalid treatment (red outline proposed)",
  "When the error first shows: on submit (fallback) or on change",
  "Clicking the selected chip again in single mode (native radios keep it)",
  "Visible required marker on the legend",
  "Home / End keys",
  "Horizontal scroll vs wrap on narrow screens (fallback: wrap)",
  "Radius: square (Weft) or pill (Blade)",
  "A second non-colour cue for \"selected\" (the fill alone is 1.10:1)",
  "ChipGroup.orientation and autoFocus: not in Blade"
]