AhaSlides Design
v0.52.0React · Vue · Lit

Components · Data Entry

Radio

Pick exactly one option from a small mutually-exclusive set, all shown at once.

Examples

Variant
Size
Direction
Disabled
Group · one name = one mutually-exclusive set (the probe is the checked option)
Poll Quiz Word cloud
Button variant · segmented connected pills
Grid List Board
Card variant · the whole bordered card is the target (checked = brand border + bg-accent fill)
Pro Essential Free
Small size · disabled states
Small on Small off Locked on Locked off

API

PropTypeDefaultNotes
checkedbooleanfalseControlled selection
valuestring""The value this option contributes to the group
namestringGroups radios; one `name` = one mutually-exclusive set
variant'dot' | 'button' | 'card'dotdot = ring + brand dot; button = segmented connected pill (Radio-Button-Group); card = the whole bordered card is the target (dot + title + optional description), selected card gets a brand border + bg-accent fill
descriptionstringCard variant only — a secondary line rendered under the title
size'default' | 'small'defaultdefault = 16px ring / 32px button; small = 14px ring / 24px button
direction'horizontal' | 'vertical'horizontalHow a group flows; in button variant also picks which edges the connected pills round + share
disabledbooleanfalseDisables the control
changeCustomEvent<{value, checked}>Composed event; read e.detail.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/aha-radio';   // registers <aha-radio>

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

When to use

When to use
  • Radio — exactly one from a small (2–5) mutually-exclusive set, all worth showing at once
  • Select — one value from a known set of more than ~5 options — don't crowd the surface
  • Checkbox — one or more independent options that don't exclude each other
Pre-select a sensible default rather than leaving the group empty. Labels are sentence case and state the choice — 'Show results after each question', not 'Show Results'. Keep product nouns: Q&A, Word cloud. Reach for variant='button' when the options are short, mutually-exclusive views (Grid/List, Day/Week/Month) that read better as a segmented control. Reach for variant='card' when each option carries a title plus a line of explanation and the whole tile should be the click target (plan pickers, mode choosers).
Surfaces
editor dashboard settings audience

Spec

Ring 16×16 circle · 1px #D4D4D4 border (small: 14×14) · Hover border #D3B4FF (purple-30) · Checked #6A1EBB ring + 8px brand dot (scales in) · Disabled #F1F1F1 fill · #EBEBEB border · Label Plus Jakarta 14/21 (small: 13/20) · Button variant segmented pill · 32px (small 24) · checked = bg-accent + brand border, shared edge collapsed · Card variant bordered card · dot + title + optional description · checked = brand border + bg-accent fill (16px pad, small 12px)