Checkbox
Checkbox Cards
NewSelectable cards with an icon, a title, a description and a price, picked with a checkbox in the corner.
npx motionsnack add checkbox-cardsCustomize
<CheckboxCards />Props
16 properties
| Property | Type | Default | Description |
|---|---|---|---|
| options | { value: string; title: string; description?: string; meta?: string; icon?: 'palette' | 'layout' | 'shopping-bag' | 'play' | 'sparkle' | 'chart-no-axes-column' | 'code' | 'pen'; disabled?: boolean }[] | 4 demo services | The cards. |
| value | string[] | - | Controlled picked values. Leave undefined to let the component manage them. |
| defaultValue | string[] | ['website'] | Picked values on first render when uncontrolled. |
| onChange | (value: string[]) => void | - | Called with all picked values whenever one changes. |
| name | string | - | Name submitted with a form; every picked card sends one value. |
| className | string | '' | Extra classes on the fieldset. |
| label | string | 'What do you need?' | Legend above the cards. Empty hides it. |
| description | string | 'Pick everything that fits, we will put it together.' | Line under the legend. Empty hides it. |
| columns | number | 2 | Cards per row on a wide enough container; narrow containers show one. |
| maxSelected | number | 0 | Most cards that can be picked. 0 means no limit. |
| limitText | string | 'You can pick up to {n}.' | Note shown when the limit is reached. {n} is the number. |
| helperText | string | 'Prices are a starting point and depend on the scope.' | Small text under the cards. Empty hides it. |
| error | string | '' | Error message. Any text colours the unchecked boxes' edge and replaces the helper text. |
| errorColor | string | '' | Overrides the per-theme error colour. Empty uses the theme pair. |
| required | boolean | false | At least one card must be picked. |
| disabled | boolean | false | Disables every card. |
About Checkbox Cards
Checkbox Cards turns a multiple choice into something people enjoy clicking: services to quote, features to add, topics to follow. Every card has an icon tile, a title, a line of description, an optional price or note and a checkbox in its top-right corner; a picked card gets a solid border and its tick draws itself in. The cards sit in one, two or three columns, decided by the width of the group itself, so they fold into a single column in a narrow sidebar. A limit can cap how many cards are picked and greys out the rest with a short note. Each card is a real checkbox underneath, so it works from the keyboard and in forms, and it shares the library's legend, helper text, error state and focus outline.
What's included
- Cards with icon, title, description and price
- Corner checkbox with a tick that draws in
- 1, 2 or 3 columns by the group's own width
- Optional limit with a note
- Helper text and error state
- Real checkboxes: keyboard and forms
- Light and dark look
- Type
- Animated React checkbox component
- Library
- Components · Checkbox
- Stack
- Next.js, React, Tailwind CSS
- Added
- 2026-11-23
- Install
npx motionsnack add checkbox-cards