Giter Club home page Giter Club logo

angular-switchery's Introduction

Angular Switchery

angular-switchery

Angular (2+) Implementation of switchery form control Works with Angular 15

Demo

Description

Angular-Switchery is a simple component that helps you turn your default HTML checkbox inputs into beautiful iOS 7 style switches in just few simple steps. You can easily customize switches, so that they match your design perfectly.

Supported by all modern browsers: Chrome, Firefox, Opera, Safari, IE9+

screen shot 2017-08-25 at 15 15 15

Installation

Npm:
$ npm install angular-switchery

Usage

import {AngularSwitcheryModule} from 'angular-switchery'

Import module dependency:

   ...
   imports: [
   ...
    AngularSwitcheryModule
   ...
   ]

## Examples

##### Checked

Only thing you need is to add a `checked` attribute to your checkbox input. Simple as that.

```html
<angular-switchery></angular-switchery>
Disabled
<angular-switchery disabled="disabled"></angular-switchery>
NgModel
 <angular-switchery [(ngModel)]="swticherModel"></angular-switchery>
 <angular-switchery [(ngModel)]="swticherModel"></angular-switchery>
 Switcher: {{swticherModel? 'ON' : 'OFF'}}
Reactive approach
<angular-switchery #f="ngForm" [formControl]="switcheryControl"></angular-switchery>
switcheryControl.value : {{f.value}}

You can play with all the examples here

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.