Checkbox

The Checkbox component provides a styled checkbox input with label support and variants.

Import

import { Checkbox } from "amvasdev-ui";

Examples

Basic Usage

<Checkbox id="terms" label="I agree to the terms and conditions" />

Required Field

<Checkbox
  id="terms"
  label="I agree to the terms and conditions"
  required
/>

Variants and Sizes

<Checkbox id="accept" label="Accept" variant="primary" size="lg" />
  <Checkbox id="confirm" label="Confirm" variant="success" size="md" />

With Error Message

You must accept the terms
<Checkbox
  id="terms"
  label="I agree to the terms and conditions"
  errorMessage="You must accept the terms"
  required
/>

Available Variants

baseprimarysecondaryaccentsuccesswarninginfoerror

Available Sizes

xssmmdlg