Nav link
A sidebar/navigation item: icon, label, description, badge, active state, and nested nav links that collapse under it.
API
For AI agents: this API as Markdown, or every component in llms-full.txt.
<ray-nav-link> · RayNavLink
A link with href (aria-current=page when active), or a button that toggles its nested links.
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
label | label | string | Text. | |
description | description | string | Second line. | |
href | href reflects | string | Makes it a link (ignored when it has nested links). | |
active | active reflects | boolean | The current page or section. | |
opened | opened reflects | boolean | Nested links are shown. | |
disabled | disabled reflects | boolean | Not interactive. | |
variant | variant reflects | light | filled | subtle | light | Style of the active state. |
color | color reflects | string | Active color. | |
iconOnly | icon-only reflects | boolean | Only the icon (left section), centered; the label becomes its accessible name and tooltip. A collapsed ray-sidebar sets it. |
| Event | Description |
|---|---|
ray-toggle | Nested links were shown or hidden. |
| Slot | Description |
|---|---|
| (default) | Nested ray-nav-link elements. |
left | Icon. |
right | Badge or count. |
| Part | Description |
|---|---|
link | The inner <a> or <button>. |
children | The nested links. |