Choice Cards
One choice out of a few, as cards. A frame slides to the card you pick, a check draws itself, and it works as a radio group in a form.
pixikit.com/docs/app-ui/forms/choice-cards
Customize
Layout
Columns3
Indicator
Duration380ms
Easing
Disabled
Props
13| Name | Type | Default | Description |
|---|---|---|---|
options | ChoiceOption[] | DEFAULT_OPTIONS | The choices, in order. |
value | string | None | The chosen option, when you hold the state. |
defaultValue | string | None | The option chosen at first, when the cards hold the state. |
onValueChange | (value: string) => void | None | Called with the option the user picks. |
name | string | None | The field name sent with a form. |
legend | string | None | The question the cards answer, shown above them. |
layout | "stack" | "grid" | "stack" | `stack` puts one card per row, `grid` sets them side by side. |
columns | number | 3 | The most cards in a row of the grid; fewer when there is no room. |
indicator | "check" | "dot" | "none" | "check" | The sign of the chosen card: a check that draws itself, a radio dot, or only the frame. |
duration | number | 380 | Milliseconds the frame takes to move to the chosen card. |
easing | "spring" | "smooth" | "linear" | "spring" | How the frame moves. |
disabled | boolean | false | Turns every card off. |
className | string | None |