Base UI (Angular) checkbox is a labeled boolean control for forms. Install checkbox, bind ngModel, and use helper text or disabled like the other fields. For mixed parent/child trees use tri-state-checkbox; for an immediate on/off without a form label row, consider toggle.
Install with npx base-ui-cli add checkbox.
Default Checkbox example below.
Add [disabled]="true" to the <base-checkbox> if need to disable the checkbox
Checkbox with helper text example below.
Use color="" attribute to define checkbox color. Supported colors are "primary", "success", "danger", "warning" and "accent"
Run the following command to add this component to your project:
npx base-ui-cli add checkbox
For AI agents
Copy a prompt with the registry name, CLI install, and import — or add the Base UI MCP server.
npx -y base-ui-mcp
Base UI provides standalone components. Import the exact elements you want to use into your component.
// Install: npx base-ui-cli add checkbox
// Paths are relative to aliases.components (default: src/app/components)
import { CheckboxComponent } from './checkbox/checkbox.component';
@Component({
selector: 'app-your-component',
imports: [
CheckboxComponent
],
template: `...`
})
export class YourComponent {} API for checkbox — generated from JSDoc in the library source.
| API | Member | Type | Default | Description |
|---|---|---|---|---|
base-checkbox | color | CheckboxColor | 'primary' | The semantic visual color. Defaults to 'primary'. |
base-checkbox | disabled | boolean | false | Whether the control is disabled (consumer-facing input). |
base-checkbox | checked | boolean | false | The checked state of the checkbox. Bound via ngModel. |
base-checkbox | indeterminate | boolean | false | Marks the checkbox as visually/semantically indeterminate (mixed) state, e.g. for a "select all" checkbox when only some items are selected. Defaults to false. |
base-checkbox | ariaLabel | string | undefined | undefined | Optional accessible name applied directly to the native `<input>`. Use this instead of `[attr.aria-label]` on `<base-checkbox>` itself — the host element isn't the focusable/interactive part, so an attribute bound to the host would never reach assistive tech. |
Content