Checkbox
Checkbox is part of the Forms and selection group. Binary selection control with checked, unchecked, and disabled states.
Installation
Section titled “Installation”npx bambiui add checkbox --framework reactnpx bambiui add checkbox --framework solidnpx bambiui add checkbox --framework sveltenpx bambiui add checkbox --framework vueimport { 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>Preview
Section titled “Preview”Behavior
Section titled “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.
Accessibility
Section titled “Accessibility”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.
Exports
Section titled “Exports”Checkbox, CheckboxIndicator, CheckboxLabelTokens
Section titled “Tokens”Customize tokens after installing and previewing the component. Relevant tokens include:
--bambi-border--bambi-ring--bambi-intent-primary-bg