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.
- Host: GitHub
- URL: https://github.com/harunurhan/ng2-slide-toggle
- Owner: harunurhan
- License: mit
- Created: 2017-03-16T15:17:50.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-19T09:19:01.000Z (over 8 years ago)
- Last Synced: 2025-03-04T06:18:19.039Z (11 months ago)
- Topics: angular2, angular2-component, toggle-switches
- Language: TypeScript
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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();
```