ng2-slide-toggle
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

ng2-slide-toggle

This is a slide toggle switch with dynamic color and text depending on the state.

Usage

npm install --save ng2-slide-toggle
import { SlideToggleModule } from 'ng2-slide-toggle';
 
@NgModule({
  ...
  imports[
    ...
    SlideToggleModule,
    ...
  ],
  ...
})
<slide-toggle></slide-toggle>

@Input() and @Output() with defaults

  @Input() onText = 'ON';
  @Input() offText = 'OFF';
  @Input() onColor = '#0088cc';
  @Input() value = false;
 
  @Output() valueChange = new EventEmitter<boolean>();

Readme

Keywords

none

Package Sidebar

Install

npm i ng2-slide-toggle

Weekly Downloads

51

Version

1.1.3

License

MIT

Last publish

Collaborators

  • harunurhan