Skip to Content
DocsEnterpriseBlogShowcase

Checkbox Card

Used to select or deselect options displayed within cards.

Ark UISourceStorybookRecipe

Setup

If you don't already have the snippet, run the following command to add the checkbox-card snippet

chakra snippet add checkbox-card

The snippet includes a closed component composition for the CheckboxCard component.

Usage

import {
  CheckboxCardAddon,
  CheckboxCardControl,
  CheckboxCardLabel,
  CheckboxCardRoot,
} from "@/components/ui/checkbox-card"
<CheckboxCardRoot>
  <CheckboxCardControl>
    <CheckboxCardLabel />
  </CheckboxCardControl>
  <CheckboxCardAddon />
</CheckboxCardRoot>

Examples

Group

Use the CheckboxCardGroup component to group multiple checkbox cards.

Select framework(s)

Sizes

Use the size prop to change the size of the checkbox card.

Variants

Use the variant prop to change the variant of the checkbox card.

Disabled

Use the disabled prop to make the checkbox card disabled.

Addon

Use the CheckboxCardAddon to add some more context to the checkbox card.

Icon

Render custom icons within the checkbox card.

Props

Root

PropDefaultType
colorPalette 'gray'
'gray' | 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'cyan' | 'purple' | 'pink' | 'accent'

The color palette of the component

size 'md'
'sm' | 'md' | 'lg'

The size of the component

variant 'outline'
'plain' | 'subtle' | 'outline'

The variant of the component

as
React.ElementType

The underlying element to render.

asChild
boolean

Use the provided child element as the default rendered element, combining their props and behavior.

For more details, read our Composition guide.
unstyled
boolean

Whether to remove the component's style.