Nondeterministic Postrequisite Metaprotocol
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@ngx-tiny/switch-input

10.0.0 • Public • Published

@ngx-tiny/switch-input

minzipped size last commit licence

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

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:

  1. Install with npm: npm install @ngx-tiny/switch-input --save

  2. 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 { }
     
  3. 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.

Install

npm i @ngx-tiny/switch-input

DownloadsWeekly Downloads

2

Version

10.0.0

License

MIT

Unpacked Size

44 kB

Total Files

19

Last publish

Collaborators

  • avatar