soft-components
Version:
Simple soft flexible set of web components
64 lines (63 loc) • 1.39 kB
TypeScript
import { EventEmitter } from '../../stencil-public-runtime';
export declare class Toggle {
/**
* Label text to be displayed inline with the toggle
*/
label: string | undefined;
/**
* This Boolean attribute lets you specify that a form control should have input focus when the page loads.
*/
autofocus: boolean;
/**
* If `true`, the user cannot interact with the input.
*/
disabled: boolean;
/**
* The name of the control, which is submitted with the form data.
*/
name: string;
/**
* aria labelby
*/
ariaLabelledby?: string;
/**
* The value of the input.
*/
value?: string | null;
/**
* Size of toggle
*/
size?: 'lg' | 'sm';
isFocused: boolean;
/**
* Emitted when a keyboard input occurred.
*/
inputEvent: EventEmitter<KeyboardEvent>;
/**
* Emitted when the value has changed.
*/
changeEvent: EventEmitter<any>;
/**
* Emitted when the input loses focus.
*/
blurEvent: EventEmitter<void>;
/**
* Emitted when the input has focus.
*/
focusEvent: EventEmitter<void>;
/**
* Emitted when a key is pressed down
*/
keyDownEvent: EventEmitter<KeyboardEvent>;
/**
* If this toggle is on by default
*/
checked?: boolean | undefined;
private onInput;
private onBlur;
private onFocus;
private onKeydown;
private onChange;
private getValue;
render(): any;
}