Label wrapper
RequiredFull clickable label and layout root.
labelFields & selection
A controlled native checkbox for one independent boolean choice.
CheckboxCheckboxPropsConfigure the production component, inspect it at responsive widths, copy synchronized JSX, and share the exact state from one workspace.
This JSX stays synchronized with the controls and uses only public package APIs.
'use client';
import { useState } from 'react';
import { Checkbox } from '@ai-created/ui';
export function Example() {
const [checked, setChecked] = useState(false);
return (
<Checkbox
checked={checked}
onChange={setChecked}
label={"I agree"}
/>
);
}
import { Checkbox } from '@ai-created/ui';Replace the version placeholder with the release tag your product has reviewed.
npm install --install-links "git+https://github.com/TheMarco/ai-created-ui.git#vX.Y.Z"@import '@ai-created/ui/styles/tokens.css';
@tailwind base;
@tailwind components;
@tailwind utilities;module.exports = {
presets: [require('@ai-created/ui/tailwind-preset')],
content: [
'./src/**/*.{js,ts,jsx,tsx,mdx}',
'./node_modules/@ai-created/ui/src/**/*.{js,ts,jsx,tsx}',
],
};Named regions define what belongs to the component, what remains optional, and where semantic responsibility lives.
Full clickable label and layout root.
labelVisually hidden checkbox owning state and semantics.
input[type=checkbox]20px state indicator and focus target proxy.
Decorative selected mark.
Visible accessible name.
The Figma-equivalent asset model, auto-layout, resizing, properties, slots, content bounds, localization, and governance contract.
Asset kind
component
Design library name
Components/Forms/Checkbox
Maturity
stable
Last reviewed
2026-08-29
Canvas applicability
Publish checked, unchecked, disabled, hover, and focus states with a text property.
| Property | Type | Default | Code mapping | Options or notes |
|---|---|---|---|---|
| CheckedRequired | variant | false | checked boolean | false, true |
| State preview | variant | default | Native hover/focus-visible and disabled boolean | default, hover, focus-visible, disabled |
| LabelRequired | text | I agree | label | No additional constraint |
Visually hidden checkbox that owns semantics.
<input type="checkbox">20px visual check surface.
Internal visual spanVisible choice label.
labelOverflow: Wrap naturally; do not truncate.
The consequence of the choice must remain explicit.
Translatable: Label
Fill the parent width with a content-height label.
No internal breakpoint
Accountable owner
Design systems form foundations owner
Canonical source: src/components/Checkbox.tsx
These measurements and semantic tokens define the supported visual contract. Local overrides should preserve the same hierarchy and interaction cues.
Indicator
20 × 20px
Indicator radius
4px
Content gap
12.5px
Check icon
15 × 15px, 3px SVG stroke at its 24px viewBox
Label text
15px
--color-action-primaryChecked fill and border.
--color-on-actionChecked mark.
--color-control-border / --color-control-border-strongUnchecked and hover boundary.
--color-focusPeer focus-visible outline.
--color-text2Label.
--motion-fastState transition.
A component is not complete until its passive, interactive, disabled, and exceptional states remain understandable in both themes.
Semantics, accessible naming, keyboard behavior, focus and announcements are implementation requirements, not optional documentation.
Use the public package API and preserve the controlled-state, native-attribute, and ref contracts described below.
import { Checkbox } from '@ai-created/ui';Server Component compatible
<Checkbox checked={accepted} onChange={setAccepted} label="I agree" />These props and helpers are compatibility contracts. Changes require migration guidance and release notes.
| Prop | Type | Default | Contract |
|---|---|---|---|
| checked | boolean | required | Controlled checked state. |
| onChange | (checked: boolean) => void | required | Called when the value changes. |
| label | string | required | Visible accessible label. |
| disabled | boolean | false | Disables the native input. |
| className | string | undefined | Additional classes. |
These rules keep the component recognizable across products without preventing deliberate composition.
The component should be verified as rendered UI, an interaction model, an accessibility surface, and a theme-aware visual artifact.