# UIB SwitchModule

## Prequisites

Add the `SwitchModule` module to your module imports:

```TS
import { SwitchModule } from '@uib/angular';

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

## UibSwitch

### Examples

```HTML
<uib-switch
  [checked]="checked"
  [disabled]="disabled"
  [id]="id"
  [name]="name"
  [required]="true"
  (change)="onChange($event)"
>
  Check this
</uib-switch>
```

Boolean attribute values can be omitted to be true:

```HTML
<uib-switch disabled required>
</uib-switch>
```

With template driven forms:

```HTML
<uib-switch [(ngModel)]="checked">
</uib-switch>
```

With reactive forms:

```HTML
<uib-switch formControlName="model">
</uib-switch>
```
