@ngx-tiny/switch-input
v10.0.0
Published
![minzipped size](https://img.shields.io/bundlephobia/minzip/@ngx-tiny/switch-input?style=for-the-badge) ![last commit](https://img.shields.io/github/last-commit/aavanzyl/ngx-tiny?style=for-the-badge) ![licence](https://img.shields.io/npm/l/@ngx-tiny/sw
Downloads
28
Maintainers
Readme
@ngx-tiny/switch-input
Angular Switch Input.
- Angular 10 implementation
- Works with SSR
- No Dependencies
- Works with Angular Forms and Standalone
- Themeable to own requirements
Installation
$ npm i @ngx-tiny/switch-input
Example
Documentation
Full Docs:
You can find the full documentation at https://aavanzyl.github.io/ngx-tiny which includes
- Installation instructions
- Usage and Demos
- API Reference
Quick Start:
Install with npm:
npm install @ngx-tiny/switch-input --save
Add NgxSwitchInputModule to your @NgModule like example below
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { NgxSwitchInputModule } from '@ngx-tiny/switch-input'; import { AppComponent } from './app.component'; @NgModule({ imports: [BrowserModule, NgxSwitchInputModule], declarations: [AppComponent], bootstrap: [AppComponent] }) export class AppModule { }
Add the component to your view for basic
<ngx-switch-input label="Toggle Me" [value]="isActive" (valueChange)="onChange($event)"> </ngx-switch-input>
or for Angular forms
<form [formGroup]="myForm" (ngSubmit)="onSubmit()"> <ngx-switch-input label="Toggle Me" formControlName="isActive"></ngx-switch-input> <br/> <button class="btn" type="submit">Submit</button> </form>
The examples above are basic. See more examples in the docs.
Support
Support me by becoming a patron and buying me a beer :)
License
See the LICENSE file.