Toggle overview

Overview
API
Theme
Examples

NbToggleComponent

Toggle is a control representing on and off states.

Showcase

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 status

Toggle can be disabled via disabled input.

Disabled Toggles

Toggle may have a label with following positions: left, right, start, end (default)

Toggles With Labels

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:

Toggle form binding
Checkbox
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.