|
|
|
@@ -14,6 +14,9 @@ page NavbarDetail {
|
|
|
|
|
state playground_maxWidth = ctx.url.searchParams.get("pg_maxWidth") ?? "full"
|
|
|
|
|
state playground_mobileLabel = ctx.url.searchParams.get("pg_mobileLabel") ?? "Navbar"
|
|
|
|
|
state playground_class = ctx.url.searchParams.get("pg_class") ?? "showcase-instance showcase-instance--1"
|
|
|
|
|
state demo_obj_0 = JSON.parse("{\"label\":\"Northwind\",\"description\":\"Console\",\"href\":\"/\"}")
|
|
|
|
|
state demo_obj_1 = JSON.parse("{\"label\":\"Northwind\",\"icon\":\"icon-[lucide--box]\",\"href\":\"/\"}")
|
|
|
|
|
state demo_obj_2 = JSON.parse("{\"label\":\"Acme\",\"href\":\"/\"}")
|
|
|
|
|
seo {
|
|
|
|
|
title = "Navbar"
|
|
|
|
|
description = "Theme-aware, responsive navbar component."
|
|
|
|
@@ -600,289 +603,54 @@ page NavbarDetail {
|
|
|
|
|
<section class="detail-section"><div class="detail-section-heading"><span>Live examples</span><h2>Designed for real product surfaces</h2><p>Compare configurations and resize the browser to check responsive behavior.</p></div><div class="demo-list">
|
|
|
|
|
<article class="demo-case">
|
|
|
|
|
<header class="demo-case-header">
|
|
|
|
|
<div><span class="demo-case-eyebrow">Recommended</span><h2>Production default</h2><p>Balanced spacing, hierarchy, and content for the most common product workflow.</p></div>
|
|
|
|
|
<div><span class="demo-case-eyebrow">Recommended</span><h2>Brand, links and actions</h2><p>The everyday shape: a brand, a row of links with the current page marked, and calls to action on the right. Arrow keys move along the menu bar.</p></div>
|
|
|
|
|
<span class="demo-case-number">01</span>
|
|
|
|
|
</header>
|
|
|
|
|
<div class="demo-workbench">
|
|
|
|
|
<div id="navbar-demo-1" class="demo-canvas demo-canvas--1">
|
|
|
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
|
|
|
|
|
|
|
|
<div class="demo-render"><Navbar size="default" label="Navbar" topbarLabel="Navbar" brand='({"id":"navbar-0-1","key":"navbar-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":"#navbar-demo","actionHref":"#navbar-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"]})' items='[{"id":"navbar-0-1","key":"navbar-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":"#navbar-demo","actionHref":"#navbar-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":"navbar-0-2","key":"navbar-0-2","value":"secondary","label":"Additional option","title":"Supporting example","description":"A clean default configuration for everyday product interfaces.","text":"Another configurable message.","href":"#navbar-demo","actionHref":"#navbar-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"]}]' actions='[{"id":"navbar-0-1","key":"navbar-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":"#navbar-demo","actionHref":"#navbar-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":"navbar-0-2","key":"navbar-0-2","value":"secondary","label":"Additional option","title":"Supporting example","description":"A clean default configuration for everyday product interfaces.","text":"Another configurable message.","href":"#navbar-demo","actionHref":"#navbar-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"]}]' sticky="false" openOnHover="false" mobileLabel="Navbar" class="showcase-instance showcase-instance--1" /></div>
|
|
|
|
|
<div class="demo-render"><Navbar size="default" label="Primary navigation" topbarLabel="Navbar" brand='{demo_obj_0}' items='[{"label":"Overview","href":"/","value":"overview"},{"label":"Projects","href":"/projects","value":"projects"},{"label":"Reports","href":"/reports","value":"reports"}]' actions='[{"label":"Sign in","href":"/login","variant":"link"},{"label":"Start free","href":"/signup","variant":"primary"}]' active="projects" sticky="false" openOnHover="false" mobileLabel="Navbar" class="showcase-instance showcase-instance--1" /></div>
|
|
|
|
|
</div>
|
|
|
|
|
<section class="demo-code" aria-label="Production default usage">
|
|
|
|
|
<section class="demo-code" aria-label="Brand, links and actions usage">
|
|
|
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
|
|
|
|
<pre><code><Navbar
|
|
|
|
|
label="Navbar"
|
|
|
|
|
topbarLabel="Navbar"
|
|
|
|
|
brand='<span>{</span>
|
|
|
|
|
"id": "navbar-0-1",
|
|
|
|
|
"key": "navbar-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": "#navbar-demo",
|
|
|
|
|
"actionHref": "#navbar-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": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option A",
|
|
|
|
|
"value": "nested-a"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option B",
|
|
|
|
|
"value": "nested-b"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"links": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Documentation",
|
|
|
|
|
"href": "#documentation"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "API reference",
|
|
|
|
|
"href": "#api-reference"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"values": [
|
|
|
|
|
"Included",
|
|
|
|
|
"Standard"
|
|
|
|
|
]
|
|
|
|
|
"label": "Northwind",
|
|
|
|
|
"description": "Console",
|
|
|
|
|
"href": "/"
|
|
|
|
|
<span>}</span>'
|
|
|
|
|
items='[
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"id": "navbar-0-1",
|
|
|
|
|
"key": "navbar-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": "#navbar-demo",
|
|
|
|
|
"actionHref": "#navbar-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": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option A",
|
|
|
|
|
"value": "nested-a"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option B",
|
|
|
|
|
"value": "nested-b"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"links": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Documentation",
|
|
|
|
|
"href": "#documentation"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "API reference",
|
|
|
|
|
"href": "#api-reference"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"values": [
|
|
|
|
|
"Included",
|
|
|
|
|
"Standard"
|
|
|
|
|
]
|
|
|
|
|
"label": "Overview",
|
|
|
|
|
"href": "/",
|
|
|
|
|
"value": "overview"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"id": "navbar-0-2",
|
|
|
|
|
"key": "navbar-0-2",
|
|
|
|
|
"value": "secondary",
|
|
|
|
|
"label": "Additional option",
|
|
|
|
|
"title": "Supporting example",
|
|
|
|
|
"description": "A clean default configuration for everyday product interfaces.",
|
|
|
|
|
"text": "Another configurable message.",
|
|
|
|
|
"href": "#navbar-demo",
|
|
|
|
|
"actionHref": "#navbar-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": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option A",
|
|
|
|
|
"value": "nested-a"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option B",
|
|
|
|
|
"value": "nested-b"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"links": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Documentation",
|
|
|
|
|
"href": "#documentation"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "API reference",
|
|
|
|
|
"href": "#api-reference"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"values": [
|
|
|
|
|
"Included",
|
|
|
|
|
"Standard"
|
|
|
|
|
]
|
|
|
|
|
"label": "Projects",
|
|
|
|
|
"href": "/projects",
|
|
|
|
|
"value": "projects"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Reports",
|
|
|
|
|
"href": "/reports",
|
|
|
|
|
"value": "reports"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
]'
|
|
|
|
|
actions='[
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"id": "navbar-0-1",
|
|
|
|
|
"key": "navbar-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": "#navbar-demo",
|
|
|
|
|
"actionHref": "#navbar-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": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option A",
|
|
|
|
|
"value": "nested-a"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option B",
|
|
|
|
|
"value": "nested-b"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"links": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Documentation",
|
|
|
|
|
"href": "#documentation"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "API reference",
|
|
|
|
|
"href": "#api-reference"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"values": [
|
|
|
|
|
"Included",
|
|
|
|
|
"Standard"
|
|
|
|
|
]
|
|
|
|
|
"label": "Sign in",
|
|
|
|
|
"href": "/login",
|
|
|
|
|
"variant": "link"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"id": "navbar-0-2",
|
|
|
|
|
"key": "navbar-0-2",
|
|
|
|
|
"value": "secondary",
|
|
|
|
|
"label": "Additional option",
|
|
|
|
|
"title": "Supporting example",
|
|
|
|
|
"description": "A clean default configuration for everyday product interfaces.",
|
|
|
|
|
"text": "Another configurable message.",
|
|
|
|
|
"href": "#navbar-demo",
|
|
|
|
|
"actionHref": "#navbar-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": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option A",
|
|
|
|
|
"value": "nested-a"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option B",
|
|
|
|
|
"value": "nested-b"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"links": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Documentation",
|
|
|
|
|
"href": "#documentation"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "API reference",
|
|
|
|
|
"href": "#api-reference"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"values": [
|
|
|
|
|
"Included",
|
|
|
|
|
"Standard"
|
|
|
|
|
]
|
|
|
|
|
"label": "Start free",
|
|
|
|
|
"href": "/signup",
|
|
|
|
|
"variant": "primary"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
]'
|
|
|
|
|
active="projects"
|
|
|
|
|
mobileLabel="Navbar">
|
|
|
|
|
<div data-slot="topbar">
|
|
|
|
|
<div class="showcase-slot">topbar slot</div>
|
|
|
|
@@ -896,290 +664,86 @@ page NavbarDetail {
|
|
|
|
|
</article>
|
|
|
|
|
<article class="demo-case">
|
|
|
|
|
<header class="demo-case-header">
|
|
|
|
|
<div><span class="demo-case-eyebrow">Dense UI</span><h2>Compact application</h2><p>A tighter variation for dashboards, side panels, tables, and operational interfaces.</p></div>
|
|
|
|
|
<div><span class="demo-case-eyebrow">Advanced</span><h2>Dropdown and mega panel</h2><p>An item carrying children opens a panel built from native details and summary, so it is keyboard operable without any extra script. Give a child its own children to get a titled column inside the panel.</p></div>
|
|
|
|
|
<span class="demo-case-number">02</span>
|
|
|
|
|
</header>
|
|
|
|
|
<div class="demo-workbench">
|
|
|
|
|
<div id="navbar-demo-2" class="demo-canvas demo-canvas--2">
|
|
|
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
|
|
|
|
|
|
|
|
<div class="demo-render"><Navbar size="sm" label="Compact example" topbarLabel="Compact example" brand='({"id":"navbar-1-1","key":"navbar-1-1","value":"primary","label":"Secondary workflow","title":"Secondary workflow","description":"A compact configuration designed for dense application layouts.","text":"A configurable sample message.","href":"#navbar-demo","actionHref":"#navbar-demo","actionLabel":"View details","icon":"icon-[lucide--zap]","iconClass":"icon-[lucide--zap]","variant":"secondary","status":"Active","time":"10:15","current":true,"selected":true,"checked":true,"disabled":false,"outgoing":false,"open":true,"number":1,"count":24,"percentage":48,"color":"#0284c7","target":"_self","ariaLabel":"Open secondary 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"]})' items='[{"id":"navbar-1-1","key":"navbar-1-1","value":"primary","label":"Secondary workflow","title":"Secondary workflow","description":"A compact configuration designed for dense application layouts.","text":"A configurable sample message.","href":"#navbar-demo","actionHref":"#navbar-demo","actionLabel":"View details","icon":"icon-[lucide--zap]","iconClass":"icon-[lucide--zap]","variant":"secondary","status":"Active","time":"10:15","current":true,"selected":true,"checked":true,"disabled":false,"outgoing":false,"open":true,"number":1,"count":24,"percentage":48,"color":"#0284c7","target":"_self","ariaLabel":"Open secondary 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":"navbar-1-2","key":"navbar-1-2","value":"secondary","label":"Additional option","title":"Supporting example","description":"A compact configuration designed for dense application layouts.","text":"Another configurable message.","href":"#navbar-demo","actionHref":"#navbar-demo","actionLabel":"View details","icon":"icon-[lucide--zap]","iconClass":"icon-[lucide--zap]","variant":"secondary","status":"Active","time":"10:15","current":false,"selected":false,"checked":false,"disabled":false,"outgoing":true,"open":true,"number":2,"count":48,"percentage":48,"color":"#0284c7","target":"_self","ariaLabel":"Open secondary 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"]}]' actions='[{"id":"navbar-1-1","key":"navbar-1-1","value":"primary","label":"Secondary workflow","title":"Secondary workflow","description":"A compact configuration designed for dense application layouts.","text":"A configurable sample message.","href":"#navbar-demo","actionHref":"#navbar-demo","actionLabel":"View details","icon":"icon-[lucide--zap]","iconClass":"icon-[lucide--zap]","variant":"secondary","status":"Active","time":"10:15","current":true,"selected":true,"checked":true,"disabled":false,"outgoing":false,"open":true,"number":1,"count":24,"percentage":48,"color":"#0284c7","target":"_self","ariaLabel":"Open secondary 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":"navbar-1-2","key":"navbar-1-2","value":"secondary","label":"Additional option","title":"Supporting example","description":"A compact configuration designed for dense application layouts.","text":"Another configurable message.","href":"#navbar-demo","actionHref":"#navbar-demo","actionLabel":"View details","icon":"icon-[lucide--zap]","iconClass":"icon-[lucide--zap]","variant":"secondary","status":"Active","time":"10:15","current":false,"selected":false,"checked":false,"disabled":false,"outgoing":true,"open":true,"number":2,"count":48,"percentage":48,"color":"#0284c7","target":"_self","ariaLabel":"Open secondary 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"]}]' sticky="false" openOnHover="false" mobileLabel="Compact example" class="showcase-instance showcase-instance--2" /></div>
|
|
|
|
|
<div class="demo-render"><Navbar size="sm" label="Compact example" topbarLabel="Compact example" brand='{demo_obj_1}' items='[{"label":"Overview","href":"/","value":"overview"},{"label":"Products","value":"products","columns":2,"description":"Everything in the platform.","children":[{"label":"Platform","children":[{"label":"Runtime","href":"/runtime","description":"The browser half.","icon":"icon-[lucide--cpu]"},{"label":"Compiler","href":"/compiler","description":"WRN to JavaScript.","icon":"icon-[lucide--hammer]"}]},{"label":"Tooling","children":[{"label":"CLI","href":"/cli","description":"Scaffold and deploy."},{"label":"Editor","href":"/editor","description":"Language server."}]}]},{"label":"Pricing","href":"/pricing","value":"pricing"}]' actions='[{"label":"Book a demo","href":"/demo","variant":"primary"}]' active="overview" sticky="false" openOnHover="false" mobileLabel="Compact example" class="showcase-instance showcase-instance--2" /></div>
|
|
|
|
|
</div>
|
|
|
|
|
<section class="demo-code" aria-label="Compact application usage">
|
|
|
|
|
<section class="demo-code" aria-label="Dropdown and mega panel usage">
|
|
|
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
|
|
|
|
<pre><code><Navbar
|
|
|
|
|
size="sm"
|
|
|
|
|
label="Compact example"
|
|
|
|
|
topbarLabel="Compact example"
|
|
|
|
|
brand='<span>{</span>
|
|
|
|
|
"id": "navbar-1-1",
|
|
|
|
|
"key": "navbar-1-1",
|
|
|
|
|
"value": "primary",
|
|
|
|
|
"label": "Secondary workflow",
|
|
|
|
|
"title": "Secondary workflow",
|
|
|
|
|
"description": "A compact configuration designed for dense application layouts.",
|
|
|
|
|
"text": "A configurable sample message.",
|
|
|
|
|
"href": "#navbar-demo",
|
|
|
|
|
"actionHref": "#navbar-demo",
|
|
|
|
|
"actionLabel": "View details",
|
|
|
|
|
"icon": "icon-[lucide--zap]",
|
|
|
|
|
"iconClass": "icon-[lucide--zap]",
|
|
|
|
|
"variant": "secondary",
|
|
|
|
|
"status": "Active",
|
|
|
|
|
"time": "10:15",
|
|
|
|
|
"current": true,
|
|
|
|
|
"selected": true,
|
|
|
|
|
"checked": true,
|
|
|
|
|
"disabled": false,
|
|
|
|
|
"outgoing": false,
|
|
|
|
|
"open": true,
|
|
|
|
|
"number": 1,
|
|
|
|
|
"count": 24,
|
|
|
|
|
"percentage": 48,
|
|
|
|
|
"color": "#0284c7",
|
|
|
|
|
"target": "_self",
|
|
|
|
|
"ariaLabel": "Open secondary workflow 1",
|
|
|
|
|
"items": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option A",
|
|
|
|
|
"value": "nested-a"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option B",
|
|
|
|
|
"value": "nested-b"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"links": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Documentation",
|
|
|
|
|
"href": "#documentation"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "API reference",
|
|
|
|
|
"href": "#api-reference"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"values": [
|
|
|
|
|
"Included",
|
|
|
|
|
"Standard"
|
|
|
|
|
]
|
|
|
|
|
"label": "Northwind",
|
|
|
|
|
"icon": "icon-[lucide--box]",
|
|
|
|
|
"href": "/"
|
|
|
|
|
<span>}</span>'
|
|
|
|
|
items='[
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"id": "navbar-1-1",
|
|
|
|
|
"key": "navbar-1-1",
|
|
|
|
|
"value": "primary",
|
|
|
|
|
"label": "Secondary workflow",
|
|
|
|
|
"title": "Secondary workflow",
|
|
|
|
|
"description": "A compact configuration designed for dense application layouts.",
|
|
|
|
|
"text": "A configurable sample message.",
|
|
|
|
|
"href": "#navbar-demo",
|
|
|
|
|
"actionHref": "#navbar-demo",
|
|
|
|
|
"actionLabel": "View details",
|
|
|
|
|
"icon": "icon-[lucide--zap]",
|
|
|
|
|
"iconClass": "icon-[lucide--zap]",
|
|
|
|
|
"variant": "secondary",
|
|
|
|
|
"status": "Active",
|
|
|
|
|
"time": "10:15",
|
|
|
|
|
"current": true,
|
|
|
|
|
"selected": true,
|
|
|
|
|
"checked": true,
|
|
|
|
|
"disabled": false,
|
|
|
|
|
"outgoing": false,
|
|
|
|
|
"open": true,
|
|
|
|
|
"number": 1,
|
|
|
|
|
"count": 24,
|
|
|
|
|
"percentage": 48,
|
|
|
|
|
"color": "#0284c7",
|
|
|
|
|
"target": "_self",
|
|
|
|
|
"ariaLabel": "Open secondary workflow 1",
|
|
|
|
|
"items": [
|
|
|
|
|
"label": "Overview",
|
|
|
|
|
"href": "/",
|
|
|
|
|
"value": "overview"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Products",
|
|
|
|
|
"value": "products",
|
|
|
|
|
"columns": 2,
|
|
|
|
|
"description": "Everything in the platform.",
|
|
|
|
|
"children": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option A",
|
|
|
|
|
"value": "nested-a"
|
|
|
|
|
"label": "Platform",
|
|
|
|
|
"children": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Runtime",
|
|
|
|
|
"href": "/runtime",
|
|
|
|
|
"description": "The browser half.",
|
|
|
|
|
"icon": "icon-[lucide--cpu]"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Compiler",
|
|
|
|
|
"href": "/compiler",
|
|
|
|
|
"description": "WRN to JavaScript.",
|
|
|
|
|
"icon": "icon-[lucide--hammer]"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
]
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option B",
|
|
|
|
|
"value": "nested-b"
|
|
|
|
|
"label": "Tooling",
|
|
|
|
|
"children": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "CLI",
|
|
|
|
|
"href": "/cli",
|
|
|
|
|
"description": "Scaffold and deploy."
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Editor",
|
|
|
|
|
"href": "/editor",
|
|
|
|
|
"description": "Language server."
|
|
|
|
|
<span>}</span>
|
|
|
|
|
]
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"links": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Documentation",
|
|
|
|
|
"href": "#documentation"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "API reference",
|
|
|
|
|
"href": "#api-reference"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"values": [
|
|
|
|
|
"Included",
|
|
|
|
|
"Standard"
|
|
|
|
|
]
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"id": "navbar-1-2",
|
|
|
|
|
"key": "navbar-1-2",
|
|
|
|
|
"value": "secondary",
|
|
|
|
|
"label": "Additional option",
|
|
|
|
|
"title": "Supporting example",
|
|
|
|
|
"description": "A compact configuration designed for dense application layouts.",
|
|
|
|
|
"text": "Another configurable message.",
|
|
|
|
|
"href": "#navbar-demo",
|
|
|
|
|
"actionHref": "#navbar-demo",
|
|
|
|
|
"actionLabel": "View details",
|
|
|
|
|
"icon": "icon-[lucide--zap]",
|
|
|
|
|
"iconClass": "icon-[lucide--zap]",
|
|
|
|
|
"variant": "secondary",
|
|
|
|
|
"status": "Active",
|
|
|
|
|
"time": "10:15",
|
|
|
|
|
"current": false,
|
|
|
|
|
"selected": false,
|
|
|
|
|
"checked": false,
|
|
|
|
|
"disabled": false,
|
|
|
|
|
"outgoing": true,
|
|
|
|
|
"open": true,
|
|
|
|
|
"number": 2,
|
|
|
|
|
"count": 48,
|
|
|
|
|
"percentage": 48,
|
|
|
|
|
"color": "#0284c7",
|
|
|
|
|
"target": "_self",
|
|
|
|
|
"ariaLabel": "Open secondary workflow 2",
|
|
|
|
|
"items": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option A",
|
|
|
|
|
"value": "nested-a"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option B",
|
|
|
|
|
"value": "nested-b"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"links": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Documentation",
|
|
|
|
|
"href": "#documentation"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "API reference",
|
|
|
|
|
"href": "#api-reference"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"values": [
|
|
|
|
|
"Included",
|
|
|
|
|
"Standard"
|
|
|
|
|
]
|
|
|
|
|
"label": "Pricing",
|
|
|
|
|
"href": "/pricing",
|
|
|
|
|
"value": "pricing"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
]'
|
|
|
|
|
actions='[
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"id": "navbar-1-1",
|
|
|
|
|
"key": "navbar-1-1",
|
|
|
|
|
"value": "primary",
|
|
|
|
|
"label": "Secondary workflow",
|
|
|
|
|
"title": "Secondary workflow",
|
|
|
|
|
"description": "A compact configuration designed for dense application layouts.",
|
|
|
|
|
"text": "A configurable sample message.",
|
|
|
|
|
"href": "#navbar-demo",
|
|
|
|
|
"actionHref": "#navbar-demo",
|
|
|
|
|
"actionLabel": "View details",
|
|
|
|
|
"icon": "icon-[lucide--zap]",
|
|
|
|
|
"iconClass": "icon-[lucide--zap]",
|
|
|
|
|
"variant": "secondary",
|
|
|
|
|
"status": "Active",
|
|
|
|
|
"time": "10:15",
|
|
|
|
|
"current": true,
|
|
|
|
|
"selected": true,
|
|
|
|
|
"checked": true,
|
|
|
|
|
"disabled": false,
|
|
|
|
|
"outgoing": false,
|
|
|
|
|
"open": true,
|
|
|
|
|
"number": 1,
|
|
|
|
|
"count": 24,
|
|
|
|
|
"percentage": 48,
|
|
|
|
|
"color": "#0284c7",
|
|
|
|
|
"target": "_self",
|
|
|
|
|
"ariaLabel": "Open secondary workflow 1",
|
|
|
|
|
"items": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option A",
|
|
|
|
|
"value": "nested-a"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option B",
|
|
|
|
|
"value": "nested-b"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"links": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Documentation",
|
|
|
|
|
"href": "#documentation"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "API reference",
|
|
|
|
|
"href": "#api-reference"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"values": [
|
|
|
|
|
"Included",
|
|
|
|
|
"Standard"
|
|
|
|
|
]
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"id": "navbar-1-2",
|
|
|
|
|
"key": "navbar-1-2",
|
|
|
|
|
"value": "secondary",
|
|
|
|
|
"label": "Additional option",
|
|
|
|
|
"title": "Supporting example",
|
|
|
|
|
"description": "A compact configuration designed for dense application layouts.",
|
|
|
|
|
"text": "Another configurable message.",
|
|
|
|
|
"href": "#navbar-demo",
|
|
|
|
|
"actionHref": "#navbar-demo",
|
|
|
|
|
"actionLabel": "View details",
|
|
|
|
|
"icon": "icon-[lucide--zap]",
|
|
|
|
|
"iconClass": "icon-[lucide--zap]",
|
|
|
|
|
"variant": "secondary",
|
|
|
|
|
"status": "Active",
|
|
|
|
|
"time": "10:15",
|
|
|
|
|
"current": false,
|
|
|
|
|
"selected": false,
|
|
|
|
|
"checked": false,
|
|
|
|
|
"disabled": false,
|
|
|
|
|
"outgoing": true,
|
|
|
|
|
"open": true,
|
|
|
|
|
"number": 2,
|
|
|
|
|
"count": 48,
|
|
|
|
|
"percentage": 48,
|
|
|
|
|
"color": "#0284c7",
|
|
|
|
|
"target": "_self",
|
|
|
|
|
"ariaLabel": "Open secondary workflow 2",
|
|
|
|
|
"items": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option A",
|
|
|
|
|
"value": "nested-a"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option B",
|
|
|
|
|
"value": "nested-b"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"links": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Documentation",
|
|
|
|
|
"href": "#documentation"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "API reference",
|
|
|
|
|
"href": "#api-reference"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"values": [
|
|
|
|
|
"Included",
|
|
|
|
|
"Standard"
|
|
|
|
|
]
|
|
|
|
|
"label": "Book a demo",
|
|
|
|
|
"href": "/demo",
|
|
|
|
|
"variant": "primary"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
]'
|
|
|
|
|
active="overview"
|
|
|
|
|
mobileLabel="Compact example">
|
|
|
|
|
<div data-slot="topbar">
|
|
|
|
|
<div class="showcase-slot">topbar slot</div>
|
|
|
|
@@ -1193,291 +757,46 @@ page NavbarDetail {
|
|
|
|
|
</article>
|
|
|
|
|
<article class="demo-case">
|
|
|
|
|
<header class="demo-case-header">
|
|
|
|
|
<div><span class="demo-case-eyebrow">Extended</span><h2>Rich configuration</h2><p>A more expressive variation using additional data, stronger emphasis, and optional states.</p></div>
|
|
|
|
|
<div><span class="demo-case-eyebrow">Compact</span><h2>Sticky and compact</h2><p>Sticky keeps the bar pinned while the page scrolls. The toggle appears below the tablet breakpoint and the links collapse behind it.</p></div>
|
|
|
|
|
<span class="demo-case-number">03</span>
|
|
|
|
|
</header>
|
|
|
|
|
<div class="demo-workbench">
|
|
|
|
|
<div id="navbar-demo-3" class="demo-canvas demo-canvas--3">
|
|
|
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
|
|
|
|
|
|
|
|
<div class="demo-render"><Navbar size="lg" label="Advanced example" topbarLabel="Advanced example" brand='({"id":"navbar-2-1","key":"navbar-2-1","value":"primary","label":"Advanced workflow","title":"Advanced workflow","description":"A richer configuration with more supporting information and actions.","text":"A configurable sample message.","href":"#navbar-demo","actionHref":"#navbar-demo","actionLabel":"Explore workflow","icon":"icon-[lucide--circle-check]","iconClass":"icon-[lucide--circle-check]","variant":"success","status":"Complete","time":"11:45","current":true,"selected":true,"checked":true,"disabled":false,"outgoing":false,"open":true,"number":1,"count":32,"percentage":91,"color":"#059669","target":"_self","ariaLabel":"Open advanced 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","Unlimited"]})' items='[{"id":"navbar-2-1","key":"navbar-2-1","value":"primary","label":"Advanced workflow","title":"Advanced workflow","description":"A richer configuration with more supporting information and actions.","text":"A configurable sample message.","href":"#navbar-demo","actionHref":"#navbar-demo","actionLabel":"Explore workflow","icon":"icon-[lucide--circle-check]","iconClass":"icon-[lucide--circle-check]","variant":"success","status":"Complete","time":"11:45","current":true,"selected":true,"checked":true,"disabled":false,"outgoing":false,"open":true,"number":1,"count":32,"percentage":91,"color":"#059669","target":"_self","ariaLabel":"Open advanced 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","Unlimited"]},{"id":"navbar-2-2","key":"navbar-2-2","value":"secondary","label":"Additional option","title":"Supporting example","description":"A richer configuration with more supporting information and actions.","text":"Another configurable message.","href":"#navbar-demo","actionHref":"#navbar-demo","actionLabel":"Explore workflow","icon":"icon-[lucide--circle-check]","iconClass":"icon-[lucide--circle-check]","variant":"success","status":"Complete","time":"11:45","current":false,"selected":false,"checked":false,"disabled":true,"outgoing":true,"open":true,"number":2,"count":64,"percentage":91,"color":"#059669","target":"_self","ariaLabel":"Open advanced 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","Unlimited"]}]' actions='[{"id":"navbar-2-1","key":"navbar-2-1","value":"primary","label":"Advanced workflow","title":"Advanced workflow","description":"A richer configuration with more supporting information and actions.","text":"A configurable sample message.","href":"#navbar-demo","actionHref":"#navbar-demo","actionLabel":"Explore workflow","icon":"icon-[lucide--circle-check]","iconClass":"icon-[lucide--circle-check]","variant":"success","status":"Complete","time":"11:45","current":true,"selected":true,"checked":true,"disabled":false,"outgoing":false,"open":true,"number":1,"count":32,"percentage":91,"color":"#059669","target":"_self","ariaLabel":"Open advanced 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","Unlimited"]},{"id":"navbar-2-2","key":"navbar-2-2","value":"secondary","label":"Additional option","title":"Supporting example","description":"A richer configuration with more supporting information and actions.","text":"Another configurable message.","href":"#navbar-demo","actionHref":"#navbar-demo","actionLabel":"Explore workflow","icon":"icon-[lucide--circle-check]","iconClass":"icon-[lucide--circle-check]","variant":"success","status":"Complete","time":"11:45","current":false,"selected":false,"checked":false,"disabled":true,"outgoing":true,"open":true,"number":2,"count":64,"percentage":91,"color":"#059669","target":"_self","ariaLabel":"Open advanced 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","Unlimited"]}]' sticky="false" openOnHover="false" mobileLabel="Advanced example" class="showcase-instance showcase-instance--3" /></div>
|
|
|
|
|
<div class="demo-render"><Navbar size="sm" label="Advanced example" topbarLabel="Advanced example" brand='{demo_obj_2}' items='[{"label":"Docs","href":"/docs","value":"docs"},{"label":"Support","href":"/support","value":"support"}]' actions='[{"label":"Dashboard","href":"/app","variant":"primary"}]' active="docs" sticky="true" openOnHover="false" mobileLabel="Toggle navigation" class="showcase-instance showcase-instance--3" /></div>
|
|
|
|
|
</div>
|
|
|
|
|
<section class="demo-code" aria-label="Rich configuration usage">
|
|
|
|
|
<section class="demo-code" aria-label="Sticky and compact usage">
|
|
|
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
|
|
|
|
<pre><code><Navbar
|
|
|
|
|
size="lg"
|
|
|
|
|
size="sm"
|
|
|
|
|
label="Advanced example"
|
|
|
|
|
topbarLabel="Advanced example"
|
|
|
|
|
brand='<span>{</span>
|
|
|
|
|
"id": "navbar-2-1",
|
|
|
|
|
"key": "navbar-2-1",
|
|
|
|
|
"value": "primary",
|
|
|
|
|
"label": "Advanced workflow",
|
|
|
|
|
"title": "Advanced workflow",
|
|
|
|
|
"description": "A richer configuration with more supporting information and actions.",
|
|
|
|
|
"text": "A configurable sample message.",
|
|
|
|
|
"href": "#navbar-demo",
|
|
|
|
|
"actionHref": "#navbar-demo",
|
|
|
|
|
"actionLabel": "Explore workflow",
|
|
|
|
|
"icon": "icon-[lucide--circle-check]",
|
|
|
|
|
"iconClass": "icon-[lucide--circle-check]",
|
|
|
|
|
"variant": "success",
|
|
|
|
|
"status": "Complete",
|
|
|
|
|
"time": "11:45",
|
|
|
|
|
"current": true,
|
|
|
|
|
"selected": true,
|
|
|
|
|
"checked": true,
|
|
|
|
|
"disabled": false,
|
|
|
|
|
"outgoing": false,
|
|
|
|
|
"open": true,
|
|
|
|
|
"number": 1,
|
|
|
|
|
"count": 32,
|
|
|
|
|
"percentage": 91,
|
|
|
|
|
"color": "#059669",
|
|
|
|
|
"target": "_self",
|
|
|
|
|
"ariaLabel": "Open advanced workflow 1",
|
|
|
|
|
"items": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option A",
|
|
|
|
|
"value": "nested-a"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option B",
|
|
|
|
|
"value": "nested-b"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"links": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Documentation",
|
|
|
|
|
"href": "#documentation"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "API reference",
|
|
|
|
|
"href": "#api-reference"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"values": [
|
|
|
|
|
"Included",
|
|
|
|
|
"Unlimited"
|
|
|
|
|
]
|
|
|
|
|
"label": "Acme",
|
|
|
|
|
"href": "/"
|
|
|
|
|
<span>}</span>'
|
|
|
|
|
items='[
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"id": "navbar-2-1",
|
|
|
|
|
"key": "navbar-2-1",
|
|
|
|
|
"value": "primary",
|
|
|
|
|
"label": "Advanced workflow",
|
|
|
|
|
"title": "Advanced workflow",
|
|
|
|
|
"description": "A richer configuration with more supporting information and actions.",
|
|
|
|
|
"text": "A configurable sample message.",
|
|
|
|
|
"href": "#navbar-demo",
|
|
|
|
|
"actionHref": "#navbar-demo",
|
|
|
|
|
"actionLabel": "Explore workflow",
|
|
|
|
|
"icon": "icon-[lucide--circle-check]",
|
|
|
|
|
"iconClass": "icon-[lucide--circle-check]",
|
|
|
|
|
"variant": "success",
|
|
|
|
|
"status": "Complete",
|
|
|
|
|
"time": "11:45",
|
|
|
|
|
"current": true,
|
|
|
|
|
"selected": true,
|
|
|
|
|
"checked": true,
|
|
|
|
|
"disabled": false,
|
|
|
|
|
"outgoing": false,
|
|
|
|
|
"open": true,
|
|
|
|
|
"number": 1,
|
|
|
|
|
"count": 32,
|
|
|
|
|
"percentage": 91,
|
|
|
|
|
"color": "#059669",
|
|
|
|
|
"target": "_self",
|
|
|
|
|
"ariaLabel": "Open advanced workflow 1",
|
|
|
|
|
"items": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option A",
|
|
|
|
|
"value": "nested-a"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option B",
|
|
|
|
|
"value": "nested-b"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"links": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Documentation",
|
|
|
|
|
"href": "#documentation"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "API reference",
|
|
|
|
|
"href": "#api-reference"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"values": [
|
|
|
|
|
"Included",
|
|
|
|
|
"Unlimited"
|
|
|
|
|
]
|
|
|
|
|
"label": "Docs",
|
|
|
|
|
"href": "/docs",
|
|
|
|
|
"value": "docs"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"id": "navbar-2-2",
|
|
|
|
|
"key": "navbar-2-2",
|
|
|
|
|
"value": "secondary",
|
|
|
|
|
"label": "Additional option",
|
|
|
|
|
"title": "Supporting example",
|
|
|
|
|
"description": "A richer configuration with more supporting information and actions.",
|
|
|
|
|
"text": "Another configurable message.",
|
|
|
|
|
"href": "#navbar-demo",
|
|
|
|
|
"actionHref": "#navbar-demo",
|
|
|
|
|
"actionLabel": "Explore workflow",
|
|
|
|
|
"icon": "icon-[lucide--circle-check]",
|
|
|
|
|
"iconClass": "icon-[lucide--circle-check]",
|
|
|
|
|
"variant": "success",
|
|
|
|
|
"status": "Complete",
|
|
|
|
|
"time": "11:45",
|
|
|
|
|
"current": false,
|
|
|
|
|
"selected": false,
|
|
|
|
|
"checked": false,
|
|
|
|
|
"disabled": true,
|
|
|
|
|
"outgoing": true,
|
|
|
|
|
"open": true,
|
|
|
|
|
"number": 2,
|
|
|
|
|
"count": 64,
|
|
|
|
|
"percentage": 91,
|
|
|
|
|
"color": "#059669",
|
|
|
|
|
"target": "_self",
|
|
|
|
|
"ariaLabel": "Open advanced workflow 2",
|
|
|
|
|
"items": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option A",
|
|
|
|
|
"value": "nested-a"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option B",
|
|
|
|
|
"value": "nested-b"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"links": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Documentation",
|
|
|
|
|
"href": "#documentation"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "API reference",
|
|
|
|
|
"href": "#api-reference"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"values": [
|
|
|
|
|
"Included",
|
|
|
|
|
"Unlimited"
|
|
|
|
|
]
|
|
|
|
|
"label": "Support",
|
|
|
|
|
"href": "/support",
|
|
|
|
|
"value": "support"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
]'
|
|
|
|
|
actions='[
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"id": "navbar-2-1",
|
|
|
|
|
"key": "navbar-2-1",
|
|
|
|
|
"value": "primary",
|
|
|
|
|
"label": "Advanced workflow",
|
|
|
|
|
"title": "Advanced workflow",
|
|
|
|
|
"description": "A richer configuration with more supporting information and actions.",
|
|
|
|
|
"text": "A configurable sample message.",
|
|
|
|
|
"href": "#navbar-demo",
|
|
|
|
|
"actionHref": "#navbar-demo",
|
|
|
|
|
"actionLabel": "Explore workflow",
|
|
|
|
|
"icon": "icon-[lucide--circle-check]",
|
|
|
|
|
"iconClass": "icon-[lucide--circle-check]",
|
|
|
|
|
"variant": "success",
|
|
|
|
|
"status": "Complete",
|
|
|
|
|
"time": "11:45",
|
|
|
|
|
"current": true,
|
|
|
|
|
"selected": true,
|
|
|
|
|
"checked": true,
|
|
|
|
|
"disabled": false,
|
|
|
|
|
"outgoing": false,
|
|
|
|
|
"open": true,
|
|
|
|
|
"number": 1,
|
|
|
|
|
"count": 32,
|
|
|
|
|
"percentage": 91,
|
|
|
|
|
"color": "#059669",
|
|
|
|
|
"target": "_self",
|
|
|
|
|
"ariaLabel": "Open advanced workflow 1",
|
|
|
|
|
"items": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option A",
|
|
|
|
|
"value": "nested-a"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option B",
|
|
|
|
|
"value": "nested-b"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"links": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Documentation",
|
|
|
|
|
"href": "#documentation"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "API reference",
|
|
|
|
|
"href": "#api-reference"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"values": [
|
|
|
|
|
"Included",
|
|
|
|
|
"Unlimited"
|
|
|
|
|
]
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"id": "navbar-2-2",
|
|
|
|
|
"key": "navbar-2-2",
|
|
|
|
|
"value": "secondary",
|
|
|
|
|
"label": "Additional option",
|
|
|
|
|
"title": "Supporting example",
|
|
|
|
|
"description": "A richer configuration with more supporting information and actions.",
|
|
|
|
|
"text": "Another configurable message.",
|
|
|
|
|
"href": "#navbar-demo",
|
|
|
|
|
"actionHref": "#navbar-demo",
|
|
|
|
|
"actionLabel": "Explore workflow",
|
|
|
|
|
"icon": "icon-[lucide--circle-check]",
|
|
|
|
|
"iconClass": "icon-[lucide--circle-check]",
|
|
|
|
|
"variant": "success",
|
|
|
|
|
"status": "Complete",
|
|
|
|
|
"time": "11:45",
|
|
|
|
|
"current": false,
|
|
|
|
|
"selected": false,
|
|
|
|
|
"checked": false,
|
|
|
|
|
"disabled": true,
|
|
|
|
|
"outgoing": true,
|
|
|
|
|
"open": true,
|
|
|
|
|
"number": 2,
|
|
|
|
|
"count": 64,
|
|
|
|
|
"percentage": 91,
|
|
|
|
|
"color": "#059669",
|
|
|
|
|
"target": "_self",
|
|
|
|
|
"ariaLabel": "Open advanced workflow 2",
|
|
|
|
|
"items": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option A",
|
|
|
|
|
"value": "nested-a"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Nested option B",
|
|
|
|
|
"value": "nested-b"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"links": [
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "Documentation",
|
|
|
|
|
"href": "#documentation"
|
|
|
|
|
<span>}</span>,
|
|
|
|
|
<span>{</span>
|
|
|
|
|
"label": "API reference",
|
|
|
|
|
"href": "#api-reference"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
],
|
|
|
|
|
"values": [
|
|
|
|
|
"Included",
|
|
|
|
|
"Unlimited"
|
|
|
|
|
]
|
|
|
|
|
"label": "Dashboard",
|
|
|
|
|
"href": "/app",
|
|
|
|
|
"variant": "primary"
|
|
|
|
|
<span>}</span>
|
|
|
|
|
]'
|
|
|
|
|
mobileLabel="Advanced example">
|
|
|
|
|
active="docs"
|
|
|
|
|
sticky="true">
|
|
|
|
|
<div data-slot="topbar">
|
|
|
|
|
<div class="showcase-slot">topbar slot</div>
|
|
|
|
|
</div>
|
|
|
|
@@ -1520,7 +839,7 @@ if (component) registerOutputHandler(component, "action", (payload) => <span>
|
|
|
|
|
<section id="api" class="detail-section"><div class="detail-section-heading"><span>Component API</span><h2>Props and configuration</h2><p>All content and behavior shown above is supplied through these props and slots.</p></div><div class="docs-table-wrap"><table class="docs-table"><thead><tr><th>Prop</th><th>Type</th><th>Default</th><th>Required</th></tr></thead><tbody><tr><td><code>size</code></td><td>string</td><td><code>"default"</code></td><td>No</td></tr><tr><td><code>color</code></td><td>string</td><td><code>"primary"</code></td><td>No</td></tr><tr><td><code>label</code></td><td>string</td><td><code>"Primary navigation"</code></td><td>No</td></tr><tr><td><code>topbarLabel</code></td><td>string</td><td><code>"Utility navigation"</code></td><td>No</td></tr><tr><td><code>brand</code></td><td>Record<string, unknown></td><td><code><span>{</span><span>}</span></code></td><td>No</td></tr><tr><td><code>items</code></td><td>unknown[]</td><td><code>[]</code></td><td>No</td></tr><tr><td><code>actions</code></td><td>unknown[]</td><td><code>[]</code></td><td>No</td></tr><tr><td><code>active</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>sticky</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>openOnHover</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>maxWidth</code></td><td>string</td><td><code>"full"</code></td><td>No</td></tr><tr><td><code>mobileLabel</code></td><td>string</td><td><code>"Toggle navigation"</code></td><td>No</td></tr><tr><td><code>class</code></td><td>string</td><td><code>""</code></td><td>No</td></tr></tbody></table></div></section>
|
|
|
|
|
</main>
|
|
|
|
|
<aside class="detail-aside">
|
|
|
|
|
<div class="detail-toc"><strong>On this page</strong><a href="#playground">Playground</a><a href="#navbar-demo-1">Production default</a><a href="#navbar-demo-2">Compact application</a><a href="#navbar-demo-3">Rich configuration</a><a href="#events">Outputs</a><a href="#api">Props API</a></div>
|
|
|
|
|
<div class="detail-toc"><strong>On this page</strong><a href="#playground">Playground</a><a href="#navbar-demo-1">Brand, links and actions</a><a href="#navbar-demo-2">Dropdown and mega panel</a><a href="#navbar-demo-3">Sticky and compact</a><a href="#events">Outputs</a><a href="#api">Props API</a></div>
|
|
|
|
|
</aside>
|
|
|
|
|
</div>
|
|
|
|
|
<nav class="detail-pagination">
|
|
|
|
|