Checkbox Card

A selectable card component that combines checkbox functionality with rich content display.

Anatomy

<script>
  import {
    CheckboxCard,
    CheckboxCardControl,
    CheckboxCardContent,
    CheckboxCardLabel,
    CheckboxCardDescription,
    CheckboxCardIndicator,
    CheckboxCardAddon,
  } from "@saas-ui/svelte/components/checkbox-card";
</script>

<CheckboxCard.Root>
  <CheckboxCardControl>
    <CheckboxCardContent>
      <CheckboxCardLabel>Option Label</CheckboxCardLabel>
      <CheckboxCardDescription>Option description</CheckboxCardDescription>
    </CheckboxCardContent>
    <CheckboxCardIndicator />
  </CheckboxCardControl>
  <CheckboxCardAddon>Additional info</CheckboxCardAddon>
</CheckboxCard.Root>

Examples

Basic Accessibility

Basic checkbox card with label and description.

Disabled Accessibility

Disabled checkbox card that prevents user interaction.

Group Accessibility

Group of checkbox cards for selecting multiple options with shared state.

Sizes Accessibility

Use the size prop to change the size of the checkbox card. Available sizes: sm, md, lg.

Variants Accessibility

Use the variant prop to change the visual style. Available variants: subtle, surface, outline.

With Addon Accessibility

Checkbox card with an addon section for supplementary information like pricing.

With Icon Accessibility

Checkbox cards with icons for visual identification of options.

Props

Prop Type Default Description
variant subtle | surface | outline outline The visual style of the component.
size sm | md | lg md The size of the component.
colour accent | gray | zinc | neutral | stone | slate | red | orange | amber | yellow | lime | green | emerald | teal | cyan | sky | blue | indigo | violet | purple | fuchsia | pink | rose gray The colour theme of the component.
disabled boolean false Whether the component is disabled.
checked boolean false Whether the checkbox card is checked.
children any - The content to be rendered inside the component.
class text - Additional CSS classes to apply.