Icon
An icon of the registry: the whole set (the components' too) changes with setIcons().
Click an icon to copy its markup. The same registry draws the components' own icons (dialog close, select chevron, alert status…).
<ray-icon name="star" filled>. The current tab of a ray-bottom-nav draws its icon filled.
Inline with text, an icon follows the font: ray test, then open
API
For AI agents: this API as Markdown, or every component in llms-full.txt.
<ray-icon> · RayIcon
setIcons({ name: '<svg…>' }) replaces or adds icons (SVG markup or an SVGElement, drawn with currentColor); iconNames() lists them. An icon may have a filled version for a state (filled; "<name>:filled" in setIcons; iconNames({ filled: true }) lists them). The components draw roles ("ui.close", "ui.remove", "ui.expand"…; iconAliases()), each its glyph until the app registers the role: setIcons({ "ui.remove": … }) changes only the chips' ×. Sizes follow the font unless size; --ray-icon-size and --ray-icon-stroke tune the whole system.
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
name | name reflects | string | Registered icon name (iconNames()); "none" draws nothing, a blank that keeps the alignment (a menu item without its check). | |
filled | filled reflects | boolean | The filled version, for a state (active, selected, favorite, unread); the outline icon when there is none. Built in: user, info, circle-check, alert-triangle, circle-x, folder, bell, star, settings, home, message-circle. | |
mirror | mirror reflects | boolean | Mirrored in a right-to-left context (dir="rtl"), for an icon that points along the text: back, forward, send, undo. The roles that do (ui.next, ui.previous, ui.first, ui.last, ui.disclosure, ui.separator) mirror by themselves. | |
size | size reflects | string | xs…xl or any CSS length. Default: --ray-icon-size, else 1em (the font). | |
label | label | string | Accessible name; without it the icon is decorative (hidden from screen readers). | |
color | color reflects | string | A palette color or any CSS color. Default: the text color. | |
stroke | stroke | number | Stroke width for stroke icons (default: --ray-icon-stroke, 2). |
| Part | Description |
|---|---|
icon | The icon box. |