npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ng-zi/extensions-checkbox

v0.0.1

Published

Angular Material Extensions for checkbox

Downloads

2

Readme

MtxCheckbox Component Overview

The CheckboxComponent provides a customizable checkbox implementation built on Angular and Angular Material 18. This component allows developers to integrate checkbox inputs into their applications with flexibility and ease.

Features

| Feature | Description | |---------------------|--------------------------------------------------------------------------------| | Label | Display a descriptive label next to the checkbox. | | Checked State | Control the initial checked state of the checkbox. | | Disabled State | Disable the checkbox to prevent user interaction. | | Indeterminate State | Set the checkbox to an indeterminate state, useful for hierarchical selections. | | Icon Support | Optionally display an icon next to the checkbox label. | | Color Customization | Customize the checkbox color to match the application's theme. | | Animation Styles | Apply animation effects to enhance user interaction. | | Custom Styles | Flexibility to apply custom CSS classes for styling. | | Accessibility | Built-in accessibility features, including ARIA attributes and keyboard navigation support. |

Usage

The CheckboxComponent can be easily integrated into Angular applications. Here's a basic example of usage:

<mtx-checkbox 
  [config]="checkboxConfig" 
  (change)="onCheckboxChange($event)">
</mtx-checkbox>

Inputs

| Input | Type | Description | |----------------|-------------------------|--------------------------------------------------------| | config | MtxCheckboxConfig | Configuration object for the checkbox component. | | label | string | Label text displayed next to the checkbox. | | checked | boolean | Initial checked state of the checkbox. | | disabled | boolean | Disables the checkbox if true. | | indeterminate| boolean | Sets the checkbox to indeterminate state. | | icon | string | Icon name displayed next to the checkbox label. | | color | string | Color palette for the checkbox. | | animation | string | Animation style for checkbox interaction. | | styleType | string | Custom style type for checkbox appearance. | | customClasses| string \| string[] | Optional custom CSS classes for styling. | | ariaLabel | string | Optional ARIA label for accessibility. | | tabIndex | number | Optional tab order for keyboard navigation. | | value | any | Optional value associated with the checkbox. |

Outputs

| Output | Type | Description | |---------|----------------------------------|---------------------------------------------------| | change| EventEmitter<MatCheckboxChange>| Emits when the checkbox state changes. |

Examples

Checkbox Component Examples

Explore various usage scenarios and examples of the CheckboxComponent in action.

Basic Example

<mtx-checkbox 
  [config]="{ label: 'Basic Checkbox' }" 
  (change)="onCheckboxChange($event)">
</mtx-checkbox>

Indeterminate Example

<mtx-checkbox 
  [config]="{ label: 'Indeterminate Checkbox', indeterminate: true }" 
  (change)="onCheckboxChange($event)">
</mtx-checkbox>

Disabled Example

<mtx-checkbox 
  [config]="{ label: 'Disabled Checkbox', disabled: true }">
</mtx-checkbox>

Example with Icon and Color

<mtx-checkbox 
  [config]="{ label: 'Checkbox with Icon', icon: 'check', color: 'accent' }" 
  (change)="onCheckboxChange($event)">
</mtx-checkbox>

Example with Animation and Style

<mtx-checkbox 
  [config]="{ label: 'Animated Checkbox', animation: 'bounce', styleType: 'rounded' }" 
  (change)="onCheckboxChange($event)">
</mtx-checkbox>

API Reference

MtxCheckbox Component API

The CheckboxComponent API documentation outlines the inputs, outputs, and methods available for configuring and interacting with the checkbox component.

Inputs

config

  • Type: MtxCheckboxConfig

  • Description: Configuration object for the checkbox component.

    | Property | Type | Default Value | Description | | -------------- | ------------------ | ------------- | ----------- | | label | string | '' | Label text displayed next to the checkbox. | | checked | boolean | false | Initial checked state of the checkbox. | | disabled | boolean | false | Disables the checkbox if true. | | indeterminate| boolean | false | Sets the checkbox to indeterminate state. | | icon | string | '' | Icon name displayed next to the checkbox label. | | color | string | 'primary' | Color palette for the checkbox. | | animation | string | '' | Animation style for checkbox interaction. | | styleType | string | '' | Custom style type for checkbox appearance. | | customClasses| string \| string[] | '' | Optional custom CSS classes for styling. | | ariaLabel | string | '' | Optional ARIA label for accessibility. | | tabIndex | number | 0 | Optional tab order for keyboard navigation. | | value | any | null | Optional value associated with the checkbox. |

customClasses

  • Type: string \| string[]
  • Description: Optional custom CSS classes to apply to the checkbox component for styling purposes.

Outputs

change

  • Type: EventEmitter<MatCheckboxChange>

  • Description: Event emitted when the checkbox state changes.

    • Properties
      • checked: boolean - New checked state of the checkbox.

Methods

The CheckboxComponent does not expose any public methods.


This api.md document provides a comprehensive overview of the inputs, outputs, and methods (if any) available for your CheckboxComponent. Adjust the content and structure as per your specific component implementation and project requirements.