Skip to content

✨ feat: add CheckboxCard component - #727

Open
futjesus wants to merge 1 commit into
mainfrom
feat/checkbox-card
Open

futjesus wants to merge 1 commit into
mainfrom
feat/checkbox-card

Conversation

@futjesus

@futjesus futjesus commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

New CheckboxCard, the multi-select counterpart of RadioCard: a clickable card with a title, an optional description and a Checkbox, reflecting the checked state on the card border. Settings built this as EventCheckboxCard for webhook events (with a key remount hack to sync an uncontrolled Checkbox).

  • Works controlled (checked) and uncontrolled (defaultChecked).
  • The checkbox is named after the title only (aria-labelledby) and described by the secondary text (aria-describedby), so screen readers do not hear the description as part of the name.
  • disabled blocks toggling and dims the card.
  • Exported from the package root.

Test plan

  • New tests: accessible name/description, toggling from the text, controlled value, disabled, axe
  • npx vitest run lib/components/CheckboxCard lib/components/Checkbox, lint, types, prettier
  • Storybook: CheckboxCard

The multi-select counterpart of RadioCard: a clickable card with a title,
a description and a checkbox that reflects the checked state on its
border. Settings built it as EventCheckboxCard for webhook events, with a
`key` remount hack to sync an uncontrolled Checkbox; CheckboxCard works
controlled and uncontrolled and names the checkbox after the title only,
describing it with the secondary text.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant