DaffSwitchComponent

The switch component provides a way to toggle between two settings.

Usage

<daff-switch [checked]="checked" loading="loading" [error]="true" [labelPosition]="daff-left"> Label Error message

Selector: 'daff-switch'

Properties

Name Type Description
@Input() disabled any Whether the switch is disabled and/or loading. disabledAttribute
ariaDisabled
classes
@Input() loading false Whether the switch is loading.
@Input() checked false Current state of switch (on/off).
@Input() labelPosition DaffLabelPosition The position of the label relative to the switch. Defaults to 'daff-left'.
@Input() error false Whether the switch shows an error. _disabled false
handleKeydown
@Input() ariaLabel '' aria-label for the switch.
@Input() id string @Output() toggled EventEmitter<boolean> onToggle
Graycore, LLC © 2018 - 2024. Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.