AhaSlides Design
v0.52.0React · Vue · Lit

Patterns · Settings

Option row

The repeatable option/answer row — one bordered row with an inside drag handle, a borderless counted textarea, an optional correct toggle (circle or square) and per-option image, and a floating hover delete; marking correct paints the whole card success-green (SETTINGS-20/34/23/39).

Examples

Orderable
Correct toggle
Toggle shape
Marked correct
Option list anatomy — one bordered row, drag handle inside, borderless field; hover for the delete (top-right). A correct row paints the whole card success-green with the circle toggle filled green + white tick
Correct-toggle shapes — circle (default) vs square (checkboxShape="square"); the second row is marked correct (green card)
Single-line answers (singleLine) — Enter is blocked, value trims on blur
Unordered set — no drag handle (SETTINGS-39), no correct toggle

API

PropTypeDefaultNotes
valuestring""The option text
placeholderstringOption textEmpty-field hint
maxlengthnumberCharacter cap — turns the focus-only counter on
orderablebooleanfalseShow the drag handle (order carries meaning) — omit for an unordered set (SETTINGS-39)
correctablebooleanfalseShow the leading correct-answer checkbox (scored types)
correctbooleanfalseWhether this option is marked correct — paints the whole card success-green + fills the toggle
checkboxShapecircle | square (attr checkboxshape)circleThe correct-answer toggle shape — a 20px outline circle, or a radius-6 square; both fill success-green with a white tick when correct
singleLineboolean (attr singleline)falseSingle-line answer — blocks Enter (no newline) and trims the value on blur
imagebooleanfalseShow the per-option image control
imagestateempty | loading | filledemptyThe image control's state
imagesrcstringThe image thumbnail URL when filled
candeletebooleantruefalse disables the delete at the minimum item count
input / correct-change / deleteCustomEventComposed events; image-add/change/edit/delete are forwarded from the image control

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

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

When to use

When to use
  • Option row — a slide type's option / answer list — the "Items" list (SETTINGS-20)
  • Numbered item — a repeatable COMPOSITE item with its own body of fields (a Question)
The row is the one border; the field inside is borderless — never a box-in-a-box (SETTINGS-34). The drag handle lives INSIDE the border and only when order matters (SETTINGS-39). The delete is hover-only and disables (not hides) at the minimum count (SETTINGS-23). No "X of Y" counter — the +Add disables at max and delete at min (SETTINGS-36).
Surfaces
editor settings

Spec

Row the ONE border — 1px #E3E3E3, radius 8; field inside is borderless (no double border) · Drag handle system-drag, FIRST child inside the border; shown only when order matters (orderable) · Text borderless counted textarea — focus-only counter, wraps, scrolls beyond ~4 lines (SETTINGS-21) · Correct toggle optional (correctable), scored types only — 20px circle (default) or radius-6 square; fills --aha-color-success with a white tick when correct · Correct card when correct the WHOLE row paints success-green: --aha-color-success border over a faint --aha-bg-positive tint fill · Single line singleLine → Enter never inserts a newline; value is trimmed on blur (single-line answers) · Image optional per-option ImageActionButton (image) — the full state set (SETTINGS-22) · Delete floats -14px OUTSIDE the top-right, hover-only, disabled (not hidden) at min (candelete=false) · Focus focus-within → #6A1EBB row border + ring (success-green ring when correct), on the one persistent border