CARDS & LISTS
ChoiceGroup
A controlled list of radio-style cards. Each option has value + label + optional description + disabled.
PREVIEW
SOURCE
import { ChoiceGroup } from '@objectifthunes/whiteboard'
const [value, setValue] = useState<'a' | 'b' | 'c'>('a')
<ChoiceGroup
value={value}
onChange={setValue}
options={[
{ value: 'a', label: 'First', description: 'Recommended for most teams.' },
{ value: 'b', label: 'Second', description: 'For workspaces with custom roles.' },
{ value: 'c', label: 'Third', description: 'For enterprise plans.' },
]}
/>NOTES
A typed, controlled list of radio-style cards. Each option needs value + label; description and disabled are optional.
ChoiceGroup<T extends string> — the value + onChange types are inferred from the options array.