AhaSlides Design
v0.52.0React · Vue · Lit

Components · Data Entry

Textarea

Enter multi-line free text — descriptions, messages, notes — with autosize and char count, rendered through the shared Textarea.

Examples

API

PropTypeDefaultNotes
valuestring""Controlled text value
size'small' | 'middle' | 'large''middle'Control height / padding: small 24, default 32, large 40
status'error' | 'warning'Validation state — recolours the border
disabledbooleanfalseNon-interactive; greyed fill
readOnlybooleanfalseShows value but blocks editing
placeholderstringEmpty-state hint (#8A8A8A)
rowsnumberFixed visible rows
autoSizeboolean | { minRows, maxRows }falseGrow with content between bounds
maxLengthnumberCap length; pair with showCount
showCountbooleanfalseShow the character counter
onChange(e) => voidFires on each change; read e.target.value

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

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

When to use

When to use
  • Textarea — multi-line free text — a description, a message, notes
  • Input — short single-line text — a name, a title, a search term
  • Select — one value from a known set — don't make the user type it
Prefer autoSize with a minRows/maxRows band so the field grows with content but never dominates the layout. Pair maxLength with showCount so the limit is visible, not a surprise on submit.
Surfaces
editor dashboard settings audience

Spec

Box radius 8 · 1px #E3E3E3 border · padding 4 11 · Hover #D3B4FF (purple-30) border · Focus brand #6A1EBB border · Text Plus Jakarta 14/21; placeholder #8A8A8A · Sizing rows or autoSize={{minRows,maxRows}} · Size small · default · large (control height 24/32/40) · Status error #F5222D · warning #FAAD14 border