UNPKG

@rhds/elements

Version:

Red Hat Design System Elements

39 lines (38 loc) 1.42 kB
import { LitElement } from 'lit'; import '@rhds/elements/rh-icon/rh-icon.js'; /** * A switch toggles the state of a setting (between on and off). Switches and checkboxes can often be used interchangeably, but the switch provides a more explicit, visible representation on a setting. * @summary A switch toggles the state of a setting (between on and off). * * @alias switch * */ export declare class RhSwitch extends LitElement { #private; static readonly styles: CSSStyleSheet[]; static readonly formAssociated = true; /** invisible, accessible label for screen readers */ accessibleLabel?: string; /** Message to display when the switch is on (i.e. checked) */ messageOn?: string; /** Message to display when the switch is off (i.e. unchecked) */ messageOff?: string; /** If the checkmark icon should be displayed when the switch is on */ showCheckIcon: boolean; /** If the switch is on */ checked: boolean; /** If the switch is disabled */ disabled: boolean; /** If the switch is reversed: message first, then control */ reversed: boolean; get labels(): NodeListOf<HTMLLabelElement>; formDisabledCallback(disabled: boolean): void; connectedCallback(): void; willUpdate(): void; render(): import("lit-html").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'rh-switch': RhSwitch; } }