Icon button
A square button for an icon (Mantine's ActionIcon). Always give it a label.
Variants × colors
primarygrayredteal
subtle (default)
filled
light
outline
default ———
transparent
raised
gradient ———
subtle is the icon button's default variant. label is the accessible name and the tooltip.
Sizes
A main action: any CSS length
size takes a length for the big button of a phone screen (start, pause, record); the icon scales with it.
Radius
States and links
API
For AI agents: this API as Markdown, or every component in llms-full.txt.
<ray-icon-button> · RayIconButton
Same properties as ray-button; variant defaults to subtle.
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
label | label reflects | string | Accessible name and tooltip (required: the button has no text). | |
variant | variant reflects | filled | light | outline | subtle | default | transparent | gradient | raised | subtle | Visual style. |
gradient | gradient reflects | string | With variant=gradient: "from to [deg]", palette colors or CSS colors ("teal blue 90"). Default: the --ray-gradient-* tokens. | |
color | color | string | A palette color or any CSS color. | |
size | size reflects | string | sm | Width and height: xs…xl or any CSS length ("5.5rem": a big main action, round with radius=full); the icon scales with it. |
disabled | disabled | boolean | Not interactive. | |
loading | loading | boolean | Shows a spinner instead of the icon. |
| Slot | Description |
|---|---|
| (default) | The icon, centered: a ray-icon or an inline <svg>, both sized to the button (1.15 times its font; --ray-icon-size or the icon's size= override it). |
| Part | Description |
|---|---|
button | The inner button. |