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]16px 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 | boolean | false | checked | No additional constraint |
| Disabled | boolean | false | disabled | No additional constraint |
| LabelRequired | text | I agree | label | No additional constraint |
Visually hidden checkbox that owns semantics.
<input type="checkbox">16px visual check surface.
Internal visual spanVisible choice label.
labelOverflow: Wrap naturally; do not truncate.
The consequence of the choice must remain explicit.
Translatable: Label
Hug content up to the parent width.
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
16 × 16px
Indicator radius
4px
Content gap
10px
Check icon
12 × 12px, 3px stroke
Label text
12px
--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.