0.1.2 • Published 6 months ago

@teenageinterface/checkbox v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Checkbox Component

The Checkbox component allows you to create a styled checkbox with two customizable states: checked and unchecked. It includes support for emitting state changes.

Installation

Ensure that you have installed the @teenageinterface/checkbox library in your Angular project. If not, you can add it using:

npm install @teenageinterface/checkbox

Usage

Import the CheckboxComponent into your Angular application:

import { CheckboxComponent } from '@teenageinterface/checkbox';

@Component({
  selector: 'pages-checkbox',
  template: `
    <tiCheckbox [(checked)]="isChecked"></tiCheckbox>
  `,
})
export default class CheckboxPage {
  isChecked = false;
}

Example

<tiCheckbox [(checked)]="isChecked"></tiCheckbox>

Properties

PropertyTypeDefaultDescription
checkedbooleanfalseSets the initial checked state of the checkbox.
idstring""An optional ID for the checkbox.
type"default" | "primary""default"Determines the style of the checkbox.

Output Events

  • checkedChange: Emits when the checked state of the checkbox changes.

Types

type

  • default: Standard checkbox with no special styling.
  • primary: Emphasized checkbox for primary actions.

Documentation

For more information, visit the official documentation.

License

This project is licensed under the MIT License.

0.1.2

6 months ago

0.1.1

7 months ago

0.1.0

7 months ago