An open API service indexing awesome lists of open source software.

https://github.com/harunurhan/ng2-slide-toggle

Slide toggle switch for Angular 2, with dynamic colors and texts.
https://github.com/harunurhan/ng2-slide-toggle

angular2 angular2-component toggle-switches

Last synced: 10 months ago
JSON representation

Slide toggle switch for Angular 2, with dynamic colors and texts.

Awesome Lists containing this project

README

          

# ng2-slide-toggle

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

## Usage

```bash
npm install --save ng2-slide-toggle
```

```typescript
import { SlideToggleModule } from 'ng2-slide-toggle';

@NgModule({
...
imports: [
...
SlideToggleModule,
...
],
...
})
```

```html

```

## @Input() and @Output() with defaults

```typescript
@Input() onText = 'ON';
@Input() offText = 'OFF';
@Input() onColor = '#0088cc';
@Input() value = false;

@Output() valueChange = new EventEmitter();
```