/** * DevExtreme (ui/button_group.d.ts) * Version: 25.1.7 * Build date: Mon Nov 10 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import { UserDefinedElement, DxElement, } from '../core/element'; import { template, ButtonType, ButtonStyle, SingleMultipleOrNone, } from '../common'; import { EventInfo, NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, ItemInfo, } from '../events'; import { CollectionWidgetItem, SelectionChangeInfo, } from './collection/ui.collection_widget.base'; import Widget, { WidgetOptions, } from './widget/ui.widget'; export { ButtonType, ButtonStyle, SingleMultipleOrNone, }; /** * The type of the contentReady event handler's argument. */ export type ContentReadyEvent = EventInfo; /** * The type of the disposing event handler's argument. */ export type DisposingEvent = EventInfo; /** * The type of the initialized event handler's argument. */ export type InitializedEvent = InitializedEventInfo; /** * The type of the itemClick event handler's argument. */ export type ItemClickEvent = NativeEventInfo & ItemInfo; /** * The type of the optionChanged event handler's argument. */ export type OptionChangedEvent = EventInfo & ChangedOptionInfo; /** * The type of the selectionChanged event handler's argument. */ export type SelectionChangedEvent = EventInfo & SelectionChangeInfo; /** * * @deprecated * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ export interface dxButtonGroupOptions extends WidgetOptions { /** * Specifies a template for all the buttons in the group. */ buttonTemplate?: template | ((buttonData: any, buttonContent: DxElement) => string | UserDefinedElement); /** * */ focusStateEnabled?: boolean; /** * */ hoverStateEnabled?: boolean; /** * Configures buttons in the group. */ items?: Array; /** * Specifies which data field provides keys used to distinguish between the selected buttons. */ keyExpr?: string | Function; /** * A function that is executed when a button is clicked or tapped. */ onItemClick?: ((e: ItemClickEvent) => void); /** * A function that is executed when a button is selected or selection is canceled. */ onSelectionChanged?: ((e: SelectionChangedEvent) => void); /** * Contains keys of selected buttons and allows you to specify initial button selection state. */ selectedItemKeys?: Array; /** * Contains the data objects that correspond to the selected buttons. The data objects are taken from the items array. */ selectedItems?: Array; /** * Specifies the button selection mode. */ selectionMode?: SingleMultipleOrNone; /** * Specifies how buttons in the group are styled. */ stylingMode?: ButtonStyle; } /** * The ButtonGroup is a UI component that contains a set of toggle buttons and can be used as a mode switcher. */ export default class dxButtonGroup extends Widget { } export type Item = dxButtonGroupItem; /** * @deprecated Use Item instead * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ export interface dxButtonGroupItem extends CollectionWidgetItem { /** * Specifies a text for the hint that appears when the button is hovered over or long-pressed. */ hint?: string; /** * Specifies the icon to be displayed on the button. */ icon?: string; /** * Specifies the button type. */ type?: ButtonType | string; /** * Specifies the global attributes to be attached to the button group item's container element. */ elementAttr?: { [key: string]: any }; } export type Properties = dxButtonGroupOptions; /** * @deprecated use Properties instead * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ export type Options = dxButtonGroupOptions;