AhaSlides Design
v0.52.0React · Vue · Lit

Components · Data Entry

Select

Pick one value (or several) from a known set — with type-to-search — rendered through the shared Select.

Examples

API

PropTypeDefaultNotes
options{ label, value }[][]The selectable set
valuestring | string[]Selected value(s); array when mode=multiple
showSearchbooleantrueType to filter options
modesingle | multiple | tagssingleSelection cardinality
sizesmall | default | largedefaultControl height 24 / 32 / 40
statuserror | warningValidation border colour
allowClearbooleanfalseShow an × to clear the selection
disabledbooleanfalseNon-interactive, muted control
loadingbooleanfalseSpinner while async options load
placeholderstringHint shown when empty
onChange(value) => voidFires with the new selection

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/select-theme';   // registers <select>

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

When to use

When to use
  • Select — one value from a known set of more than ~5 options — don't make the user type it
  • Radio — 2–5 mutually-exclusive options all worth showing at once
  • Input — free text that isn't a known set
Pre-select the recommended default rather than leaving it empty. Keep option labels short and sentence case; for long lists keep showSearch on. For a short, known set (or a select inside a shadow-DOM surface like a settings row) reach for the leaf Select field (slug `select-field`, <aha-select>) instead — this composite is for search / tags / multi / virtualised lists.
Surfaces
editor dashboard settings

Spec

Control height 32 · radius 8 · 1px #E3E3E3 border · Search showSearch — type to filter options · Focus brand #6A1EBB border · Selected option brand-tint #F9F5FF row, #6A1EBB label · Placeholder #8A8A8A · Size small 24 · default 32 · large 40 · Status error #F5222D · warning #FAAD14 border