Icon button

A square button for an icon (Mantine's ActionIcon). Always give it a label.

Source on GitHub

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
Code

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.

PropertyAttributeTypeDefaultDescription
labellabel reflectsstringAccessible name and tooltip (required: the button has no text).
variantvariant reflectsfilled | light | outline | subtle | default | transparent | gradient | raisedsubtleVisual style.
gradientgradient reflectsstringWith variant=gradient: "from to [deg]", palette colors or CSS colors ("teal blue 90"). Default: the --ray-gradient-* tokens.
colorcolorstringA palette color or any CSS color.
sizesize reflectsstringsmWidth and height: xs…xl or any CSS length ("5.5rem": a big main action, round with radius=full); the icon scales with it.
disableddisabledbooleanNot interactive.
loadingloadingbooleanShows a spinner instead of the icon.
SlotDescription
(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).
PartDescription
buttonThe inner button.