AhaSlides Design
v0.52.0React · Vue · Lit

Components · Data Entry

Select field

Pick one value from a short, known set — a lightweight native-select-backed field that embeds anywhere.

Examples

Size
Status
Disabled
Select field · native-<select>-backed leaf · the playground drives this one element (Size · Status · Disabled)
Sizes · small 24 · default 32 · large 40
States · placeholder · value · error · warning · disabled
In a settings row · the leaf is the control aha-settings-list reuses (control.type "select")

API

PropTypeDefaultNotes
options{ label, value }[][]The selectable set — a JSON `options` attribute or an `.options` property
valuestringSelected value (controlled)
placeholderstringDimmed hint shown when no value is selected
sizesmall | default | largedefaultControl height 24 / 32 / 40
statuserror | warningValidation border colour
disabledbooleanfalseNon-interactive, muted control
changeCustomEvent<{value}>Composed event; read e.detail.value
openbooleanfalseReflects/controls the themed listbox popup being open (also toggled by click/keyboard). aria-expanded stays in sync.

Install

# .npmrc — once: point the @ahaslides-product scope at GitHub Packages
@ahaslides-product:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}   # a GitHub token with read:packages

npm i @ahaslides-product/design
import '@ahaslides-product/design/tokens.css';   // once, at the app root
import '@ahaslides-product/design/aha-select';   // registers <aha-select>

Agent feed for this component (absolute, fetchable anywhere): select-field.agent.json · select-field.md · select-field.llms.txt

When to use

When to use
  • Select field (this leaf) — one value from a short, known set (≤ ~10), or a select inside a shadow-DOM surface like a settings row — no search/tags/multi needed
  • Select (composite) — a long list needing type-to-search, multiple/tags, async loading, or option groups
  • Radio — 2–5 mutually-exclusive options all worth showing at once
Pre-select the recommended default rather than leaving it empty. Keep option labels short and sentence case; keep product nouns — Q&A, Word cloud. This is the leaf half of the hybrid — reach for the composite Select the moment you need search, tags, or a virtualised list.
Surfaces
editor dashboard settings audience

Spec

Control height 32 · radius 8 · 1px #E3E3E3 border · Size small 24 · default 32 · large 40 · Focus brand #6A1EBB border + soft ring · Placeholder #8A8A8A · Caret trailing aha-icon system-caret-down (UA arrow suppressed) · Status error #F5222D · warning #FF7747 border · Popup themed role=listbox — white surface, radius 8, elevation shadow, brand-tint hover, check on selected; Arrow/Home/End + typeahead + Escape; outside-click close