Icon Button
Round, hoverable button wrapping a slotted SVG icon.
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
tooltip | string | undefined | undefined | Tooltip text shown after a short delay; also used as the accessible name when `aria-label` is not set. |
disabled | boolean | false | Disables the button: no pointer events, no focus, reduced opacity. |
aria-label | string | null | null | Accessible name forwarded to the inner ` |
selected | boolean | false | Pressed state of a toggle button (`aria-pressed="true"`); styled with the `__selected--*` variables. |
toggle | boolean | false | Declares a toggle button: `aria-pressed` is announced as `false` while not selected. Set by `c2-button-group` in selection modes. |
CSS custom properties
Grouped by the element and state they target. Click a group to collapse it; click a name to copy it.
| Name | Type | Default | Description |
|---|---|---|---|
--c2-icon-button--background-color | color | — | |
--c2-icon-button--border-radius | border-radius | 999px | |
--c2-icon-button--border | border | none | |
--c2-icon-button__hover--background-color | color | rgb(230, 230, 230) | |
--c2-icon-button__focus--outline | outline | 2px solid rgba(2, 101, 220, 0.4) | |
--c2-icon-button__focus--outline-offset | pixel | 2px | |
--c2-icon-button__disabled--opacity | opacity | 0.38 | |
--c2-icon-button__selected--background-color | color | rgb(230, 230, 230) | Pressed state of a toggle button (see `selected`). |
--c2-icon-button__icon--width | pixel | 24px | |
--c2-icon-button__icon--height | pixel | 24px | |
--c2-icon-button__icon--color | color | — | |
--c2-icon-button__icon__hover--color | color | — | |
--c2-icon-button__icon__selected--color | color | — | |
--c2-icon-button__state-layer--size | pixel | 48px | |