/axiom-ngx-toggle

Stylish Angular Toggle

Primary LanguageTypeScriptMIT LicenseMIT

Axiom ngx-toggle

Online Demo

Usage Demo

Installation

Install component package from npm :

npm install axiom-toggle

Import component module :
import { AxiomToggleModule } from 'axiom-toggle';

...

@NgModule({
  imports: [
    BrowserModule,
    AxiomToggleModule,
  ], 
  declarations: [
    AppComponent
  ],
  bootstrap: [AppComponent]
})

...

Usage

Use ngModel

<ax-toggle [(ngModel)]="model" 
  axMode="round"
  axColor="indigo">
</ax-toggle>

Use ReactiveFroms

<ax-toggle formControlName="model" 
  axMode="round"
  axColor="indigo">
</ax-toggle>

@Input() Params

Name Usage
axMode round,flat (default=flat)
axColor purple,indigo,pink,red,cyan,green,yellow,amber,orange,brown

@Output() Params

Name Usage
ngModelChange Model's change default event

License

MIT