Toggle overview
NbToggleComponent
Toggle is a control representing on and off states.
Installation
Import NbToggleComponent to your feature module.
@NgModule({
imports: [
// ...
NbToggleModule,
],
})
export class PageModule { }
Usage
Toggle may have one of the following statuses: basic, primary, success, warning, danger, info, control
Toggle can be disabled via disabled input.
Toggle may have a label with following positions: left, right, start, end (default)
You can set control state via checked binding:
<nb-toggle [(checked)]="checked"></nb-toggle>
Or it could be set via reactive forms or ngModel bindings:
Previous page
Radio
Next page
Need some help or found an issue?
Ask on Stack Overflow with tag `nebular` or post an issue on GitHub.
