Checkbox

Compact checkbox control with variant and size options.

Import/Installation

import { Checkbox, Label } from "@lottiefiles/creator-plugins-ui";

Preview

Usage

import { useState } from "react";

const [checked, setChecked] = useState(true);

<div className="flex items-center gap-2">
  <Checkbox checked={checked} onCheckedChange={setChecked} aria-label="Enable snapping" />
  <Label variant="inline">Enable snapping</Label>
</div>;

Props

PropTypeDefaultRequiredDescription
checkedbooleanNoThe controlled checked state of the checkbox.
defaultCheckedbooleanNoThe default checked state when uncontrolled.
onCheckedChange(checked: boolean) => voidNoCallback fired when the checked state changes.
disabledbooleanNoWhether the checkbox is disabled.
variant"default" | "error""default"NoThe visual variant of the checkbox.
size"xs" | "sm" | "default""default"NoThe size of the checkbox.
aria-labelstringNoOptional aria-label. Required if no visible label is provided.

Built on Base UI Checkbox. See their docs for primitive-level details.

Last updated: August 5, 2026 at 11:47 AMEdit this page