Run the CLI
Use the CLI to add the component to your project.
A control that allows the user to toggle between checked and not checked.
Use the CLI to add the component to your project.
Create the component directory structure and add the following files to your project.
import { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { ZardCheckboxComponent } from '../checkbox.component';
@Component({
selector: 'z-demo-checkbox-default',
imports: [ZardCheckboxComponent, FormsModule],
standalone: true,
template: `
<span z-checkbox></span>
<span z-checkbox [(ngModel)]="checked">Default Checked</span>
`,
})
export class ZardDemoCheckboxDefaultComponent {
checked = true;
}