Components
CardSelectionGroup
This example is composed with Storybook args. Open the interactive workbench to change its props and inspect the generated API controls.
Import
import { CardSelectionGroup } from '@simal/ui/nativewindui';Props
| Prop | Values | Default | Description |
|---|---|---|---|
cards | — | [] | The options, each { title, description, icon? }. The group renders them stacked and owns which one is selected. |
onSelect | — | — | Fires with the index of the pressed card. Index, not the card object — hold your own array to map it back. |
Examples
With Icons
<CardSelectionGroup
cards={[
{
title: 'Option A',
description: 'Supporting description text for the first option.',
icon: <Icon name="building" size={24} />,
},
{
title: 'Option B',
description: 'Supporting description text for the second option.',
icon: <Icon name="banknote" size={24} />,
},
{
title: 'Option C',
description: 'Supporting description text for the third option.',
icon: <Icon name="doc" size={24} />,
},
]}
/>