The toggle button wraps a native button element and exposes additional value and selected properties.
Use it in a button group to make a toolbar or a set of options.
- Element
-
igc-toggle-button
- Slots
-
default— Renders the label/content of the button.
- CSS Parts
-
toggle— The native button element. -
focused— Added to the toggle part when the button has keyboard focus.
Properties
Section titled "Properties"tagName
Section titled "tagName"The tagName read-only property of the Element interface returns the tag name of the element on which it's called.
tagName: "igc-toggle-button" = 'igc-toggle-button' Methods
Section titled "Methods"Removes focus from the button.
blur(): void Defined in src/components/button-group/toggle-button.ts:137
Returns void
click
Section titled "click"Simulates a mouse click on the element.
click(): void Defined in src/components/button-group/toggle-button.ts:143
Returns void
disconnectedCallback
Section titled "disconnectedCallback"Invoked when the component is removed from the document's DOM.
This callback is the main signal to the element that it may no longer be
used. disconnectedCallback() should ensure that nothing is holding a
reference to the element (such as event listeners added to nodes external
to the element), so that it is free to be garbage collected.
``
An element may be re-connected after being disconnected.
disconnectedCallback(): void Defined in src/components/button-group/toggle-button.ts:89
Returns void
focus
Section titled "focus"Sets focus on the button.
focus(options: FocusOptions): void Defined in src/components/button-group/toggle-button.ts:130
Parameters
- options:
FocusOptions