@limetech/lime-elements
Version:
53 lines • 2.1 kB
TypeScript
import { EventEmitter } from '../../stencil-public-runtime';
import { ListItem, ListSeparator } from '../list-item/list-item.types';
/**
* The Radio Button component provides a convenient way to create a group of radio buttons
* from an array of options. Radio buttons allow users to select a single option from
* multiple choices, making them ideal for exclusive selections.
*
* :::note
* A single radio button is never useful in a UI. Radio buttons should always come in groups
* of at least 2 options where only one can be selected at a time.
* :::
*
* @exampleComponent limel-example-radio-button-group-basic
* @exampleComponent limel-example-radio-button-group-deselect-selected
* @exampleComponent limel-example-radio-button-group-icons
* @exampleComponent limel-example-radio-button-group-multiple-lines
* @beta
*/
export declare class RadioButtonGroup {
/**
* Array of radio button options to display
*/
items: Array<ListItem | ListSeparator>;
/**
* The currently selected item in the radio button group.
* This is a ListItem object that contains the value and other properties of the selected item.
* If no item is selected, this will be `undefined`.
*/
selectedItem?: ListItem<string | number>;
/**
* Disables all radio buttons when `true`
*/
disabled: boolean;
/**
* Set to `true` if the radio button group should display larger icons with a background
*/
badgeIcons: boolean;
/**
* By default, lists will display 3 lines of text, and then truncate the rest.
* Consumers can increase or decrease this number by specifying
* `maxLinesSecondaryText`. If consumer enters zero or negative
* numbers we default to 1; and if they type decimals we round up.
*/
maxLinesSecondaryText: number;
/**
* Emitted when the selection changes with the full ListItem payload
*/
change: EventEmitter<ListItem<string | number | undefined>>;
render(): any;
private createItems;
private handleChange;
}
//# sourceMappingURL=radio-button-group.d.ts.map