Icon

An icon of the registry: the whole set (the components' too) changes with setIcons().

Source on GitHub

Registered icons

Click an icon to copy its markup. The same registry draws the components' own icons (dialog close, select chevron, alert status…).

Sizes
xs sm md lg xl 2.5rem
Stroke
1 1.5 2 (default) 2.5
Filled: a state
Outline at rest, filled when on: <ray-icon name="star" filled>. The current tab of a ray-bottom-nav draws its icon filled.
Colors
blue green yellow red violet #0ea5e9
In context
New project Export Passing

Inline with text, an icon follows the font: run ray test, then open report.html.

Swap the set
Filled set Replaces icons app-wide: the gallery above and every component follow.
Code

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.

PropertyAttributeTypeDefaultDescription
namename reflectsstringRegistered icon name (iconNames()); "none" draws nothing, a blank that keeps the alignment (a menu item without its check).
filledfilled reflectsbooleanThe 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.
mirrormirror reflectsbooleanMirrored 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.
sizesize reflectsstringxs…xl or any CSS length. Default: --ray-icon-size, else 1em (the font).
labellabelstringAccessible name; without it the icon is decorative (hidden from screen readers).
colorcolor reflectsstringA palette color or any CSS color. Default: the text color.
strokestrokenumberStroke width for stroke icons (default: --ray-icon-stroke, 2).
PartDescription
iconThe icon box.