UNPKG

@umbraco-ui/uui-radio

Version:

Radio input, Umbraco backoffice style. Package contains two custom elements, <uui-radio> and <uui-radio-group>. You must wrap radio elements in the group, to make the input work. Can participate in native form element.

72 lines (71 loc) 1.95 kB
import { LitElement } from 'lit'; /** * @element uui-radio * @description - a single radio, should never be use as a stand-alone. Must be wrapped in `<uui-radio-group></uui-radio-group>` element. * @slot - slot to set the label if no `label` attribute is set. * @cssprop --uui-radio-button-size - Sets the size of the radio button. * @fires change - on input change */ export declare class UUIRadioElement extends LitElement { #private; private _inputElement; /** * This is a name property of the `<uui-radio>` component. It reflects the behaviour of the native `<input />` element and its name attribute. * @type {string} * @attr * @default '' */ name: string; /** * This is a value property of the `<uui-radio>`. * @type {string} * @attr * @default '' */ value: string; label: string; checked: boolean; /** * Disables the input. * @type {boolean} * @attr * @default false */ disabled: boolean; /** * Sets the input to readonly mode, meaning value cannot be changed but still able to read and select its content. * @type {boolean} * @attr * @default false */ readonly: boolean; focus(): void; click(): void; /** * Call to uncheck the element * @method uncheck */ uncheck(): void; /** * Call to check the element. * @method uncheck */ check(): void; /** * Call to make the element focusable, this sets tabindex to 0. * @method makeFocusable */ makeFocusable(): void; /** * Call to make the element focusable, this sets tabindex to -1. * @method makeUnfocusable */ makeUnfocusable(): void; render(): import("lit-html").TemplateResult<1>; static styles: import("lit").CSSResult[]; } declare global { interface HTMLElementTagNameMap { 'uui-radio': UUIRadioElement; } }