form-field — wyrd.component.select

Select

Native single-choice select field with label, description, validation state, options, optional placeholder, and one canonical value-change event.

Install @wyrd-company/react or the Flutter package and use it directly — your DESIGN.md does the styling.

01

Examples

Generated from the contract's examples block. Previews are the published @wyrd-company/react component, themed by the brand's role tokens — flip the site's light/dark toggle and they follow.

Code target Applies to every example on component pages.
empty state: default

Choose how collaborators should reach you.

Usage
import { WyrdSelect } from "@wyrd-company/react";

<WyrdSelect placeholder="Choose a contact method" options={[{"value":"email","label":"Email"},{"value":"phone","label":"Phone"},{"value":"mail","label":"Mail"}]} label="Contact method" description="Choose how collaborators should reach you." />

// events: onValueChange
selected state: selected
Usage
import { WyrdSelect } from "@wyrd-company/react";

<WyrdSelect defaultValue="email" options={[{"value":"email","label":"Email"},{"value":"phone","label":"Phone"},{"value":"mail","label":"Mail"}]} label="Contact method" />

// events: onValueChange
invalid state: invalid
Usage
import { WyrdSelect } from "@wyrd-company/react";

<WyrdSelect isInvalid isRequired placeholder="Choose a contact method" options={[{"value":"email","label":"Email"},{"value":"phone","label":"Phone"},{"value":"mail","label":"Mail"}]} label="Contact method" error="Select a contact method." />

// events: onValueChange
02

Properties

NameTypeDefaultSummary
value string undefined Controlled selected option value.
default-value string undefined Initial uncontrolled selected option value.
options array Ordered selectable option items.
placeholder string undefined Disabled placeholder option shown when no value is selected.
is-disabled boolean false Prevents changing selection and exposes disabled semantics.
is-required boolean false Marks the field as requiring one selected option.
is-invalid boolean false Marks the selection as invalid and associates the error slot.
03

Slots & events

SlotCardinalityAcceptsSummary
label exactly-one text Visible label and accessible-name source.
description zero-or-one text Help text associated with the select.
error zero-or-one text Validation error associated when is-invalid is true.
EventPayloadSummary
value-change value, action Canonical value-change event carrying the selected option value.
04

Tokens

The contract's token bindings. Open the shared contextual sidebar from any example; primary swatches reflect the color you pick there. Error swatches show the active preset's values; editing any knob switches to custom and resets error to TWW · Ink.

BindingToken
root.gap spacing.xs
label.color color.on-surface
label.text typography.label-md
control.background color.surface
control.foreground color.on-surface
control.placeholder color.on-surface-variant
control.border-color color.outline
control.border-color-focus color.primary
control.border-color-invalid color.error
control.border-width 1px
control.radius rounded.sm
control.padding-x spacing.md
control.padding-y spacing.sm
control.text typography.body-md
description.color color.on-surface-variant
description.text typography.body-md
error.color color.error
error.text typography.body-md
05

States

StateSourceSummary
default platform Enabled field with no invalid or disabled state.
selected property State when an option matching value or default-value is selected.
focus-visible platform Keyboard-visible focus state.
disabled property Disabled state derived from is-disabled or option disabled.
invalid property Invalid state derived from is-invalid.
required property Required state derived from is-required.
06

Accessibility

From the contract's accessibility obligations. Role combobox; Label slot provides the accessible name.

  • Native select follows platform selection keys.
  • Tab moves focus into and out of the field in document order.
  • Required, invalid, and disabled states are exposed through platform semantics.
  • Error text is associated only when invalid.
  • Each option exposes selected and disabled state through native select semantics.
  • Verified under: rtl, reduced-motion, cvd-deuteranopia, density-compact, text-expansion.
07

SDUI

Status: serializable. Options serialize as ordered records; value-change serializes to a named binding/action channel.

SerializableMembers
Propertiesvalue, default-value, options, placeholder, is-disabled, is-required, is-invalid
Slotslabel, description, error
Eventsvalue-change
The Wyrding Way — a contract-first design system. © Wyrd Company