Free
Pro

Checkbox

Ply 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.

When to use

  • Multi-select options and “agree to terms” on a form.
  • When the value is a boolean (or an array of checked values you own).

When not to use

  • A single on/off setting with no adjacent options — toggle reads better.
  • Three states (some children checked) — use tri-state-checkbox.

Install with npx ply-ui-cli add checkbox.

free

Playground

color

HTML

<ply-checkbox color="primary" [checked]="true">Checkbox</ply-checkbox>

Default Checkbox

Default Checkbox example below.

Default Checkbox disabled

Add [disabled]="true" to the <ply-checkbox> if need to disable the checkbox

Checkbox with helper text

Checkbox with helper text example below.

Checkbox colors

Use color="" attribute to define checkbox color. Supported colors are "primary", "success", "danger", "warning" and "accent"

Installation

Run the following command to add this component to your project:

bash

npx ply-ui-cli add checkbox

API Reference

For AI agents

Copy a prompt with the registry name, CLI install, and import — or add the Ply MCP server.

bash

npx -y ply-ui-mcp

Ply provides standalone components. Import the exact elements you want to use into your component.

typescript (Example)

// Install: npx ply-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 reference for checkbox
APIMemberTypeDefaultDescription
ply-checkboxcolorCheckboxColor'primary'The semantic visual color. Defaults to 'primary'.
ply-checkboxdisabledbooleanfalseWhether the control is disabled (consumer-facing input).
ply-checkboxcheckedbooleanfalseThe checked state of the checkbox. Bound via ngModel.
ply-checkboxindeterminatebooleanfalseMarks the checkbox as visually/semantically indeterminate (mixed) state, e.g. for a "select all" checkbox when only some items are selected. Defaults to false.
ply-checkboxariaLabelstring | undefinedundefinedOptional accessible name applied directly to the native `<input>`. Use this instead of `[attr.aria-label]` on `<ply-checkbox>` itself — the host element isn't the focusable/interactive part, so an attribute bound to the host would never reach assistive tech.