-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Milestone
Description
Task Description ✏️
Implement the Radio component as part of the design system epic #40.
Radio provides a consistent toggle control for selecting a single option within a group. It will consume theme tokens for colors, spacing, and sizing, support controlled checked state, disabled state, and custom icons.
Acceptance Criteria ✅
-
Radiocomponent implemented. - Supports controlled
checkedstate. - Supports
disabledprop. - Supports
colorprop (default,primary,secondary,error,info,success,warning) mapped to theme tokens. - Supports
sizeprop (small,medium) mapped to theme spacing and icon sizes. - Supports custom
iconandcheckedIconprops for unchecked and checked visuals. - Supports
id,required, andinputPropsfor accessibility and forms. - Supports
onChangecallback for state changes. - Renders children or label text correctly associated with the input.
- Unit tests verify checked state, disabled state, color, size, icon rendering, and onChange behavior.
- Storybook stories demonstrate all states (checked, unchecked, disabled) and color/size/icon variations.
- No raw CSS values — all styles derived from theme tokens.
- Code passes linting, typing, and CI checks.
Dependencies 🔗
No response
Definition of Ready (DoR) 📋
- Task is independent and scoped to the
Radiocomponent. - Base primitive and theme tokens are implemented and available.
- Props to be supported by Radio are agreed upon (
checked,disabled,color,size,icon,checkedIcon,id,required,inputProps,onChange).
Definition of Done (DoD) 🏁
-
Radiocomponent implemented with controlled checked support. - Color, size, checked, disabled, and icons work correctly.
- onChange fires correctly for user interaction.
- Unit tests cover all states and props.
- Storybook stories demonstrate all states, sizes, colors, and icons.
- Code reviewed, linted, typed, and passes CI checks.
- Documentation updated in Storybook for Radio usage.
- Component is ready for reuse across the design system.
Additional Notes or Resources 📎
- MDN Docs on radio input: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio