Hacktron Design System

Checkbox

A box the user checks or unchecks to turn one option on or off.

By clicking this checkbox, you agree to the terms and conditions.

<template>  <Checkbox    label="Accept terms and conditions"    description="By clicking this checkbox, you agree to the terms and conditions."  /></template>

Props

Name Type Default
variant"list" | "card""list"
disabledbooleanfalse
labelstring-
descriptionstring-
...propsUCheckbox props (color, size, indicator, icon, modelValue, required, name, ...)-

Guidelines

Do

  • Use variant="card" for a single standalone agreement/opt-in checkbox (e.g. accepting terms) - the bordered row gives it enough visual weight to stand alone on a page.
  • Use the default variant="list" inside a form alongside other fields, or for multiple checkboxes stacked in a plain list - a full card border on every row is too heavy in that context.
  • Pass description for anything that needs a one-line clarification; keep label itself short. It always renders one size smaller than label regardless of size - a deliberate override, not a bug.

Don't

  • Don't reach for color/size as a way to invent a new visual style - they're escape hatches to UCheckbox's native palette/scale for real cases the Figma spec doesn't cover, not a styling API for this component.
  • Don't use this for a toggle that takes effect immediately (e.g. a settings switch) - use Switch instead. Checkbox implies a value that's submitted/confirmed later, not applied instantly.

Examples

Card variant

A single standalone agreement/opt-in checkbox - the bordered row gives it enough visual weight to stand alone on a page.

Unchecked
Checked
Disabled
<template>  <Checkbox    variant="card"    label="Accept terms and conditions"    description="By clicking this checkbox, you agree to the terms and conditions."  /></template>