@umbraco-ui/uui-toggle
Version:
Umbraco style toggle component
31 lines (30 loc) • 1.68 kB
TypeScript
import { UUIBooleanInputElement } from '@umbraco-ui/uui-boolean-input/lib';
/**
* Umbraco Toggle-switch, toggles between off/on. Technically a checkbox.
* @element uui-toggle
* @fires UUIBooleanInputEvent#change- fires when the element is begin checked by a user action
* @cssprop --uui-toggle-size - Define the toggle size.
* @cssprop --uui-toggle-switch-width - Define the slider width.
* @cssprop --uui-toggle-background-color - Set the toggle background color
* @cssprop --uui-toggle-border-color - Set the toggle border color
* @cssprop --uui-toggle-border-color-hover - Set the toggle background color when hovered
* @cssprop --uui-toggle-background-color-hover - Set the toggle background color when hovered
* @cssprop --uui-toggle-border-color-focus - Set the toggle background color when focused
* @cssprop --uui-toggle-background-color-focus - Set the toggle background color when focused
* @extends UUIBooleanInputElement
*/
export declare class UUIToggleElement extends UUIBooleanInputElement {
/**
* This is a static class field indicating that the element is can be used inside a native form and participate in its events. It may require a polyfill, check support here https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals. Read more about form controls here https://web.dev/more-capable-form-controls/
* @type {boolean}
*/
static readonly formAssociated = true;
constructor();
renderCheckbox(): import("lit-html").TemplateResult<1>;
static styles: import("lit").CSSResult[];
}
declare global {
interface HTMLElementTagNameMap {
'uui-toggle': UUIToggleElement;
}
}