AhaSlides Design
v0.52.0React · Vue · Lit

Patterns · Settings

Question list

An editable list of collapsible questions — each a prompt field plus its OptionRow choices — with a full-width "+ Add question" that disables at max; composes NumberedItem + OptionRow (SETTINGS-31/36).

Examples

Editable questions — each a collapsible card (prompt + choices); full-width "+ Add question" below

API

PropTypeDefaultNotes
questionsArray<{id,prompt,options:[{id,text,correct}]}>[]The model; set as a property or a JSON attribute
minnumber1Minimum questions — delete disables at this count
maxnumberMaximum questions — +Add disables at this count
minoptionsnumber2Minimum options per question — option delete disables at this count
maxoptionsnumberMaximum options per question — +Add option disables at this count
disabledbooleanfalseDisable adding questions
changeCustomEvent<{questions}>Composed event on any edit; read e.detail.questions (the full model)

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

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

When to use

When to use
  • Question list — an editable set of questions, each with its own prompt + choices (a quiz builder, a survey)
  • Option row list — a flat list of options for ONE question — compose OptionRow directly
The primary +Add spans the full panel width (SETTINGS-31) — never hugged to one side. Never a textual "X of Y" count (SETTINGS-36) — the +Add disables at max and delete disables at min. Composes NumberedItem + OptionRow; it does not re-implement the numbered card or the option row.
Surfaces
editor settings

Spec

Question a collapsible NumberedItem — prompt (counted input) + OptionRow choices + "+ Add option" · Add question full-width dashed "+ Add question" (system-plus), disabled at max (SETTINGS-31) · Add option per-question "+ Add option", disabled at maxoptions · Limits no "X of Y" counter — +Add disables at max, delete disables at min (SETTINGS-36) · Delete question delete disables at min; option delete disables at minoptions