AhaSlides Design
v0.52.0React · Vue · Lit

Components · Data Entry

Input

A single-line text field — names, search, numbers, short free text — with sizes, error/warning status, affixes, a clear ✕ and a password reveal.

Examples

Size
Status
Prefix
Clearable
States · error · rest · warning · disabled · readonly
Sizes · small 24 · default 32 · large 40
Affixes · prefix icon · suffix text · clearable · password reveal

API

PropTypeDefaultNotes
valuestring""Controlled text value
placeholderstringHint shown when empty
typetext | number | email | password | searchtextNative input type; password adds a reveal (eye) toggle
sizesmall | default | largedefaultControl height — small 24 · default 32 · large 40 (DS V3 field scale); radius stays 8 (sm/md/lg accepted as aliases)
statusdefault | error | warningdefaultBorder + ring recolour; error also sets aria-invalid (legacy `invalid` boolean = status error)
disabledbooleanfalseNon-interactive; grey fill
readonlybooleanfalseSelectable but not editable; secondary fill
prefix-icon / prefixstringLeading affix — an icon by name (from the DS library) or plain text
suffix-icon / suffixstringTrailing affix — an icon by name or plain text (e.g. a domain)
clearablebooleanfalseShows a ✕ when non-empty that wipes the value and emits `clear`
inputCustomEvent<{value}>Composed event on each keystroke; read e.detail.value
clearCustomEvent<{value}>Composed event when the ✕ clears the field

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-input';   // registers <aha-input>

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

When to use

When to use
  • Input — short single-line free text — a name, a search term, a number
  • Textarea — multi-line free text (descriptions, messages)
  • Select — one value from a known set — don't make the user type it
Label the field with a noun phrase; use placeholder for an example, never as the label. Show the error status only after the user leaves the field, and pair it with a message that says how to fix it. Reach for a prefix icon to hint the field's job (a magnifier for search, an envelope for email), a suffix for a fixed unit or domain, clearable for search/filter fields, and password reveal for credentials.
Surfaces
editor dashboard settings audience

Spec

Box height 32 (default) · radius 8 · padding 0 12 · Sizes small 24 · default 32 · large 40 — all radius 8 · Rest border 1px #E3E3E3 · Hover border #D3B4FF (purple-30) · Focus #6A1EBB border + 2px #D3B4FF@30% ring (on the persistent wrapper) · Error #F5222D border + error-tinted ring; sets aria-invalid · Warning #FF7747 border + warning-tinted ring · Disabled #F1F1F1 fill, #EBEBEB border, not-allowed · Readonly #F7F7F7 fill, still selectable · Affixes prefix/suffix icon (by name) or text; clearable ✕; password reveal (eye) · Text Plus Jakarta 14/21; placeholder #8A8A8A