ToggleButton API
Props, callbacks and methods. Select an underlined type to explore its fields, allowed values and callback arguments.
ToggleButton9 props1 callbacks0 methods
Props9
| Name | Type | Description |
|---|---|---|
roundedOptional | boolean | undefined | Pill-shaped corners for any button variant. |
hrefOptional | string | undefined | Render navigation with native anchor semantics. |
targetOptional |
| Browsing context used when a button renders a link, for example _blank. |
relOptional | string | undefined | Link relationship tokens, such as noopener, when the button has an href. |
busyOptional | boolean | undefined | Show progress and block activation until cleared, preserving variant colors. |
classNameOptional | string | undefined | Additional CSS classes applied to the component root. |
variantOptional | "link" | "ghost" | "solid" | "default" | "primary" | "secondary" | "danger" | "danger-outline" | undefined | Selects the visual action style without changing the action behavior. |
sizeOptional | "default" | "compact" | undefined | Visual size of this component; numeric icon/avatar sizes are in pixels, while controls use the declared named sizes. |
pressedRequired | boolean | Controlled pressed state of the toggle button. |
Events and callbacks1
| Name | Type | Description |
|---|---|---|
onPressedChangeRequired |
| Receives the new pressed state when the toggle is activated. |
Methods0
No component-specific imperative methods. Use props and callbacks to control this component.