Skip to content

Checkbox

Checkbox is part of the Forms and selection group. Binary selection control with checked, unchecked, and disabled states.

Terminal window
npx bambiui add checkbox --framework react
Terminal window
npx bambiui add checkbox --framework solid
Terminal window
npx bambiui add checkbox --framework svelte
Terminal window
npx bambiui add checkbox --framework vue
import { Checkbox, CheckboxIndicator, CheckboxLabel } from "@/components/ui/checkbox";
export function Example() {
return <Checkbox />;
}
import { Checkbox, CheckboxIndicator, CheckboxLabel } from "~/components/ui/checkbox";
export function Example() {
return <Checkbox />;
}
<script lang="ts">
import { Checkbox, CheckboxIndicator, CheckboxLabel } from "$lib/components/ui/checkbox";
</script>
<Checkbox />
<script setup lang="ts">
import { Checkbox, CheckboxIndicator, CheckboxLabel } from "@/components/ui/checkbox";
</script>
<template>
<Checkbox />
</template>
Checkbox preview should be verified in the target framework after copying the component source. Interactive behavior comes from generated public artifacts, not docs-only mock behavior.

Use for independent choices or multiple selections in a group.

Generated output uses serializable data-* attributes for state and styling. Controlled components fire bambi:<event-name> events and expect application state to update externally; uncontrolled components manage local source state and still fire events.

Use semantic labels, visible focus states, and keyboard interaction patterns appropriate for Checkbox. Do not hide required instructions in transient UI. Verify focus movement and disabled states in the installed framework output.

Checkbox, CheckboxIndicator, CheckboxLabel

Customize tokens after installing and previewing the component. Relevant tokens include:

  • --bambi-border
  • --bambi-ring
  • --bambi-intent-primary-bg