ngx-slide-toggle
Slide Toggle component for Angular 2/4/5.
It is extremely lightweight(<50kbs) and complies with Angular Package Format.
It is still under development and I am planning to add color customization along with few more toggles like IOS and Sony UI toggle.
Installation
npm install ngx-slide-toggle --save
Usage
Import the SlideToggleModule
in your required module.
;;; ;
;
API
material-slide-toggle Inputs
Attribute | Description | Type | Required | Default |
---|---|---|---|---|
name | Name value will be applied to the input element if present. | string | No | |
id | A unique id for the slide-toggle input. If none is supplied, it will be auto-generated. | string | No | |
checked | Whether the slide-toggle element is checked or not. | boolean | No | false |
disabled | Whether the component is disabled. | boolean | No | false |
aria-label | Used to set the aria-label attribute on the underlying input element. | string | No | null |
aria-labelledby | Used to set the aria-labelledby attribute on the underlying input element. | string | No | null |
material-slide-toggle Events
Name | Description | Type |
---|---|---|
change | An event will be dispatched each time the toggle changes its value. | boolean |