igniteui-angular
Version:
Ignite UI for Angular is a dependency-free Angular toolkit for building modern web apps
101 lines (97 loc) • 2.95 kB
TypeScript
import * as i0 from '@angular/core';
import { AfterViewInit } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { CheckboxBaseDirective } from 'igniteui-angular/directives';
import { EditorProvider } from 'igniteui-angular/core';
/**
*
* The Switch component is a binary choice selection component.
*
* @igxModule IgxSwitchModule
*
* @igxTheme igx-switch-theme, igx-tooltip-theme
*
* @igxKeywords switch, states, tooltip
*
* @igxGroup Data Entry & Display
* @remarks
*
* The Ignite UI Switch lets the user toggle between on/off or true/false states.
*
* @example
* ```html
* <igx-switch [checked]="true">
* Simple switch
* </igx-switch>
* ```
*/
declare class IgxSwitchComponent extends CheckboxBaseDirective implements ControlValueAccessor, EditorProvider, AfterViewInit {
/**
* Returns the class of the switch component.
*
* @example
* ```typescript
* let switchClass = this.switch.cssClass;
* ```
*/
cssClass: string;
/**
* Sets/gets whether the switch is on or off.
* Default value is 'false'.
*
* @example
* ```html
* <igx-switch [checked]="true"></igx-switch>
* ```
*/
set checked(value: boolean);
get checked(): boolean;
/**
* Sets/gets the `disabled` attribute.
* Default value is `false`.
*
* @example
* ```html
* <igx-switch disabled><igx-switch>
* ```
*/
disabled: boolean;
/**
* Sets/gets whether the switch component is invalid.
* Default value is `false`.
*
* @example
* ```html
* <igx-switch invalid></igx-switch>
* ```
* ```typescript
* let isInvalid = this.switch.invalid;
* ```
*/
invalid: boolean;
/**
* Sets/gets whether the switch component is on focus.
* Default value is `false`.
*
* @example
* ```typescript
* this.switch.focused = true;
* ```
*/
focused: boolean;
static ɵfac: i0.ɵɵFactoryDeclaration<IgxSwitchComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<IgxSwitchComponent, "igx-switch", never, { "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; }, {}, never, ["*"], true, never>;
static ngAcceptInputType_disabled: unknown;
static ngAcceptInputType_invalid: unknown;
}
/**
* @hidden
* @deprecated
* IMPORTANT: The following is NgModule exported for backwards-compatibility before standalone components
*/
declare class IgxSwitchModule {
static ɵfac: i0.ɵɵFactoryDeclaration<IgxSwitchModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<IgxSwitchModule, never, [typeof IgxSwitchComponent], [typeof IgxSwitchComponent]>;
static ɵinj: i0.ɵɵInjectorDeclaration<IgxSwitchModule>;
}
export { IgxSwitchComponent, IgxSwitchModule };