Checkbox
NewA simple choice. Native checkbox behavior with accessible labels and Angular forms support.
Overview
Click the box or its label. Use Tab to focus and Space to toggle.
HTMLBasic usage
<av-checkbox label="Remember me" [(ngModel)]="remember" />Group
Set binary to false to collect selected values in an array.
Selected: Email
HTMLMultiple selection
<av-checkbox label="Email" [binary]="false"
value="Email" [(ngModel)]="channels" />Indeterminate
A partially selected group shows a dash. Select all or change individual items.
Sizes
Reactive forms and validation
Use Validators.requiredTrue when the checkbox must be selected.
Disabled
Usage
Import AvCheckbox and FormsModule or ReactiveFormsModule.
TYPESCRIPTComponent setup
import { AvCheckbox } from 'avero-ui';
import { FormsModule } from '@angular/forms';
@Component({
imports: [AvCheckbox, FormsModule],
})Make it your own. Customize
--av-checkbox-accent, --av-checkbox-border, --av-checkbox-radius and --av-checkbox-focus.