AhaSlides Design
v0.52.0React · Vue · Lit

Patterns · Settings

Numbered item

The numbered wrapper for a repeatable composite item — a grey card with a muted number chip, a "<Label> N" header, a hover delete, and a body slot (SETTINGS-43).

Examples

Variant
Contained (default) — the whole item in ONE grey card; hover to reveal the delete
The fields for question 1 go here (prompt, options, …).
Question 2 — delete disabled at the minimum count.
Plain — no fill, for single-field items only
A single-field item with no grey card.

API

PropTypeDefaultNotes
variantcontained | plaincontainedcontained = grey card (composite items); plain = no fill (single-field items only)
nnumberThe item's number, shown in the chip and the header
labelstringHeader noun — rendered as "<Label> N"
deletablebooleanfalseShow the hover delete; omit / false hides it entirely
candeletebooleantruefalse disables the delete (at the minimum item count) without hiding it
collapsiblebooleanfalseShow a header caret that collapses the body in place (the QuestionList case)
deleteCustomEvent<{n}>Composed event when the delete is pressed; read e.detail.n
toggleCustomEvent<{collapsed}>Composed event when the collapse caret is toggled; read e.detail.collapsed

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

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

When to use

When to use
  • Numbered item — a repeatable COMPOSITE item — more than one field, or a nested option list (a Question, a Card, a Round)
  • Option row — a flat list of single values — not wrapped in a numbered card
  • Plain variant — a single-field repeatable item that does not warrant a grey card
This is the ONE exception to "never a container around settings" (SETTINGS-15): it wraps a repeatable composite item, not plain settings. A composite item must keep the contained grey card — dropping the fill (plain, or a hand-rolled header over a fill-less body) is a build mistake (SETTINGS-43). The chip is muted grey, never a purple badge.
Surfaces
editor settings

Spec

Contained whole item in ONE #F7F7F7 grey card, radius 12, no border, padding 12 · Chip 22px muted-grey pill (#F1F1F1 / #4A4A4A), semibold 12 — never radical-purple · Header chip + "<Label> N" title (semibold 14) + hover delete · Delete tertiary text trash (system-trash), hover-only, space reserved; #F5222D on hover · deletable=false the delete control is hidden entirely (non-removable item) · candelete=false the delete is shown but disabled (minimum-count case) · Plain no fill — for SINGLE-FIELD items only