toggleButton()
toggleButton(
caption,handler?,tooltip?):HTMLDivElement
Defined in: ui.ts:504
Creates a toggle button (d4-toggle-button). When clicked, marks itself as current
(d4-current) and clears that class from sibling toggle buttons under the same parent.
Wrap a set of these in toggleButtonGroup to get the group container styling.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
caption | string | undefined | Button text. |
handler | Function | null | null | Invoked on click after the active state is updated. |
tooltip | string | null | null | Tooltip shown on hover. |
Returns
HTMLDivElement