Skip to content
PixiKit

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
NameTypeDefaultDescription
optionsChoiceOption[]DEFAULT_OPTIONSThe choices, in order.
valuestringNoneThe chosen option, when you hold the state.
defaultValuestringNoneThe option chosen at first, when the cards hold the state.
onValueChange(value: string) => voidNoneCalled with the option the user picks.
namestringNoneThe field name sent with a form.
legendstringNoneThe question the cards answer, shown above them.
layout"stack" | "grid""stack"`stack` puts one card per row, `grid` sets them side by side.
columnsnumber3The 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.
durationnumber380Milliseconds the frame takes to move to the chosen card.
easing"spring" | "smooth" | "linear""spring"How the frame moves.
disabledbooleanfalseTurns every card off.
classNamestringNone

More forms blocks in Pro

View all

Related