Checkbox for Angular
Introduction
Section titled “Introduction”A single on/off choice built on a native <input type=“checkbox”>, restyled with appearance: none, with label, help text, mixed (indeterminate) state, required validation, and localized messages.
- Native checkboxA restyled native checkbox stays the focus target and the source of truth.
- Mixed stateAn indeterminate state for parent choices that are partly selected.
- Required consentRequired and custom checks with localized messages, for terms and confirmations.
- Help textA description under the label, linked for screen readers.
Behavior, design tokens, and limitations are described on the Checkbox page; this page covers the Angular API.
Live example
Section titled “Live example”import { Component } from '@angular/core';import { FormControl, ReactiveFormsModule, Validators } from '@angular/forms';import { AuiCheckbox } from '@absoluteui/angular/checkbox';
@Component({ selector: 'app-signup', imports: [ReactiveFormsModule, AuiCheckbox], template: `<aui-checkbox label="I accept the terms" [required]="true" [formControl]="terms"></aui-checkbox>`,})export class SignupComponent { readonly terms = new FormControl(false, { nonNullable: true, validators: [Validators.requiredTrue] });}Install and start
Section titled “Install and start”npm install @absoluteui/angular @absoluteui/components @absoluteui/core @absoluteui/themeSetup with provideAbsoluteUI() is covered in Getting started. Styles are included with the component.
import { AuiCheckbox } from '@absoluteui/angular/checkbox';Defaults for every instance: provideAbsoluteUIConfig({ components: { checkbox: { ... } } }) (see Configuration).
API reference
Section titled “API reference”<aui-checkbox>
Section titled “<aui-checkbox>”Class AuiCheckbox; template reference #ref="auiCheckbox".
Server rendering: Renders on the server; the browser re-creates it after hydration.
Angular forms: implements ControlValueAccessor and Validator; the form value is boolean. Bind [formControl], formControlName, or [(ngModel)]; validation messages of the component report through the aui error key. See Forms.
Inputs
Section titled “Inputs”| Input | Type | Default | Description |
|---|---|---|---|
label |
string |
Required. Visible label and accessible name; clicking it toggles the checkbox. | |
hideLabel |
boolean |
false |
Visually hide the label; it remains the accessible name. |
indeterminate |
boolean |
false |
Mixed state (aria-checked=mixed via the native property). Cleared when the user toggles. |
value |
string |
'on' |
Submitted value when checked. |
name |
string |
Form field name. | |
description |
string |
Help text referenced by aria-describedby. | |
required |
boolean |
false |
The box must be checked; shows the required indicator. |
disabled |
boolean |
false |
Disables the checkbox. |
validate |
(checked: boolean) => string | null |
Consumer validation; return a message to mark the state invalid. | |
icons |
Partial<CheckboxIcons> |
Icon slot overrides. | |
validationTiming |
ValidationTiming |
'blur' |
When validation messages first appear; afterwards they update live. |
locale |
string |
'en-US' |
Message locale. |
Two-way bindings
Section titled “Two-way bindings”| Model | Type | Change output | Description |
|---|---|---|---|
[(checked)] |
boolean |
(checkedChange) |
The checked: [(checked)] without forms; with Angular forms, bind the form control instead. |
Outputs
Section titled “Outputs”| Output | Payload | Description |
|---|---|---|
(changed) |
CheckboxChangeDetail |
The user toggled the checkbox. Re-emits aui-change. |
Methods
Section titled “Methods”Call them through a viewChild query or a template reference.
| Method | Description |
|---|---|
reportValidity(): boolean | undefined |
Show messages now and return validity. |
setCustomError(message: string | null): void |
External error; cleared when the user toggles. |
getFormValue(): string | null | undefined |
value when checked, otherwise null. |
focus(): void |
Focus the checkbox. |
reset(): void |
Restore the initial checked and mixed state and clear dirty/touched/submitted state. |
Test harness
Section titled “Test harness”AuiCheckboxHarness from @absoluteui/angular/testing. <aui-checkbox>.
Accessibility and performance
Section titled “Accessibility and performance”Pattern: Native <input type=“checkbox”> with a <label for> association (HTML; WAI-ARIA APG Checkbox, dual- and tri-state).
The Angular component renders the framework-neutral component, so its keyboard support, roles, WCAG 2.2 criteria, budgets, and import cost apply unchanged: see Checkbox: Accessibility and performance.
(c) 2026 Kasadara Technology Solutions Pvt Ltd. AbsoluteUI is free to use under the AbsoluteUI Free Use License; it is not open source.