// Generated by scripts/generate-showcase.mjs. Do not edit directly.
page LegendIndicatorDetail {
layout = "showcase"
state playground_size = ctx.url.searchParams.get("pg_size") ?? "default"
state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary"
state playground_title = ctx.url.searchParams.get("pg_title") ?? "Legend Indicator example"
state playground_description = ctx.url.searchParams.get("pg_description") ?? "A polished default legend indicator for a modern application."
state playground_items = JSON.parse(ctx.url.searchParams.get("pg_items") ?? "[{\"id\":\"legend-indicator-0-1\",\"key\":\"legend-indicator-0-1\",\"value\":\"primary\",\"label\":\"Primary workflow\",\"title\":\"Primary workflow\",\"description\":\"A clean default configuration for everyday product interfaces.\",\"text\":\"A configurable sample message.\",\"href\":\"#legend-indicator-demo\",\"actionHref\":\"#legend-indicator-demo\",\"actionLabel\":\"View details\",\"icon\":\"icon-[lucide--sparkles]\",\"iconClass\":\"icon-[lucide--sparkles]\",\"variant\":\"primary\",\"status\":\"Active\",\"time\":\"09:30\",\"current\":true,\"selected\":true,\"checked\":true,\"disabled\":false,\"outgoing\":false,\"open\":true,\"number\":1,\"count\":16,\"percentage\":72,\"color\":\"#7c3aed\",\"target\":\"_self\",\"ariaLabel\":\"Open primary workflow 1\",\"items\":[{\"label\":\"Nested option A\",\"value\":\"nested-a\"},{\"label\":\"Nested option B\",\"value\":\"nested-b\"}],\"links\":[{\"label\":\"Documentation\",\"href\":\"#documentation\"},{\"label\":\"API reference\",\"href\":\"#api-reference\"}],\"values\":[\"Included\",\"Standard\"]},{\"id\":\"legend-indicator-0-2\",\"key\":\"legend-indicator-0-2\",\"value\":\"secondary\",\"label\":\"Additional option\",\"title\":\"Supporting example\",\"description\":\"A clean default configuration for everyday product interfaces.\",\"text\":\"Another configurable message.\",\"href\":\"#legend-indicator-demo\",\"actionHref\":\"#legend-indicator-demo\",\"actionLabel\":\"View details\",\"icon\":\"icon-[lucide--sparkles]\",\"iconClass\":\"icon-[lucide--sparkles]\",\"variant\":\"primary\",\"status\":\"Active\",\"time\":\"09:30\",\"current\":false,\"selected\":false,\"checked\":false,\"disabled\":false,\"outgoing\":true,\"open\":true,\"number\":2,\"count\":32,\"percentage\":72,\"color\":\"#7c3aed\",\"target\":\"_self\",\"ariaLabel\":\"Open primary workflow 2\",\"items\":[{\"label\":\"Nested option A\",\"value\":\"nested-a\"},{\"label\":\"Nested option B\",\"value\":\"nested-b\"}],\"links\":[{\"label\":\"Documentation\",\"href\":\"#documentation\"},{\"label\":\"API reference\",\"href\":\"#api-reference\"}],\"values\":[\"Included\",\"Standard\"]}]")
state playground_variant = ctx.url.searchParams.get("pg_variant") ?? "default"
state playground_class = ctx.url.searchParams.get("pg_class") ?? "showcase-instance showcase-instance--1"
seo {
title = "Legend Indicator"
description = "Theme-aware, responsive legend indicator component."
}
view {
Components / Base / Legend Indicator
Interactive playground Configure Legend Indicator Change any prop and inspect the server-rendered component immediately.
Live preview
page LegendIndicatorExample {
state items = [
{
"id": "legend-indicator-0-1",
"key": "legend-indicator-0-1",
"value": "primary",
"label": "Primary workflow",
"title": "Primary workflow",
"description": "A clean default configuration for everyday product interfaces.",
"text": "A configurable sample message.",
"href": "#legend-indicator-demo",
"actionHref": "#legend-indicator-demo",
"actionLabel": "View details",
"icon": "icon-[lucide--sparkles]",
"iconClass": "icon-[lucide--sparkles]",
"variant": "primary",
"status": "Active",
"time": "09:30",
"current": true,
"selected": true,
"checked": true,
"disabled": false,
"outgoing": false,
"open": true,
"number": 1,
"count": 16,
"percentage": 72,
"color": "#7c3aed",
"target": "_self",
"ariaLabel": "Open primary workflow 1",
"items": [
{
"label": "Nested option A",
"value": "nested-a"
} ,
{
"label": "Nested option B",
"value": "nested-b"
}
],
"links": [
{
"label": "Documentation",
"href": "#documentation"
} ,
{
"label": "API reference",
"href": "#api-reference"
}
],
"values": [
"Included",
"Standard"
]
} ,
{
"id": "legend-indicator-0-2",
"key": "legend-indicator-0-2",
"value": "secondary",
"label": "Additional option",
"title": "Supporting example",
"description": "A clean default configuration for everyday product interfaces.",
"text": "Another configurable message.",
"href": "#legend-indicator-demo",
"actionHref": "#legend-indicator-demo",
"actionLabel": "View details",
"icon": "icon-[lucide--sparkles]",
"iconClass": "icon-[lucide--sparkles]",
"variant": "primary",
"status": "Active",
"time": "09:30",
"current": false,
"selected": false,
"checked": false,
"disabled": false,
"outgoing": true,
"open": true,
"number": 2,
"count": 32,
"percentage": 72,
"color": "#7c3aed",
"target": "_self",
"ariaLabel": "Open primary workflow 2",
"items": [
{
"label": "Nested option A",
"value": "nested-a"
} ,
{
"label": "Nested option B",
"value": "nested-b"
}
],
"links": [
{
"label": "Documentation",
"href": "#documentation"
} ,
{
"label": "API reference",
"href": "#api-reference"
}
],
"values": [
"Included",
"Standard"
]
}
]
view {
<LegendIndicator
title="Legend Indicator example"
description="A polished default legend indicator for a modern application."
items="{ items} "
/>
}
}
Event output Interact with the preview to inspect the typed payload.
Live examples Designed for real product surfaces Compare configurations and resize the browser to check responsive behavior.
page LegendIndicatorExample {
state items = [
{
"label": "Direct",
"color": "#8b5cf6",
"value": "42%"
} ,
{
"label": "Search",
"color": "#14b8a6",
"value": "35%"
} ,
{
"label": "Referral",
"color": "#f59e0b",
"value": "23%"
}
]
view {
<LegendIndicator
title="Traffic sources"
description="Select a source to toggle its visibility."
items="{ items} "
/>
}
}
Component outputs Receive every typed component output Use declarative output handlers in .wrn files or register a direct output handler from JavaScript. The canonical API exposes payload and does not require event.detail.
@toggleFires when the component changes between open and closed or on and off states.
@selectFires when an item, option, card, or result is selected.
<LegendIndicator
@toggle='console.log(payload)'
@select='console.log(payload)'
/> Direct output handlers.js import { registerOutputHandler } from "@wrnexus/csr/outputs"
const component = document.querySelector("[data-ui-component=\"LegendIndicator\"], [data-component=\"LegendIndicator\"]")
if (component) registerOutputHandler(component, "toggle", (payload) => {
console.log("toggle", payload)
} )
if (component) registerOutputHandler(component, "select", (payload) => {
console.log("select", payload)
} )
Component API Props and configuration All content and behavior shown above is supplied through these props and slots.
Prop Type Default Required sizestring "default"No colorstring "primary"No titlestring "Legend Indicator"No descriptionstring ""No itemsunknown[] []No variantstring "default"No classstring ""No
}
}