// Generated by scripts/generate-showcase.mjs. Do not edit directly.
page DropdownDetail {
  layout = "showcase"
  state playground_items = JSON.parse(ctx.url.searchParams.get("pg_items") ?? "[{\"label\":\"Open dashboard\",\"description\":\"View the operational workspace\",\"value\":\"dashboard\",\"icon\":\"icon-[lucide--layout-dashboard]\"},{\"label\":\"Share record\",\"value\":\"share\",\"icon\":\"icon-[lucide--share-2]\",\"shortcut\":\"Ctrl S\"},{\"type\":\"divider\"},{\"label\":\"Delete record\",\"value\":\"delete\",\"icon\":\"icon-[lucide--trash-2]\",\"danger\":true}]")
  state playground_open = (ctx.url.searchParams.get("pg_open") ?? "false") === "true"
  state playground_defaultOpen = (ctx.url.searchParams.get("pg_defaultOpen") ?? "false") === "true"
  state playground_label = ctx.url.searchParams.get("pg_label") ?? "Open playground menu"
  state playground_icon = ctx.url.searchParams.get("pg_icon") ?? ""
  state playground_showChevron = (ctx.url.searchParams.get("pg_showChevron") ?? "true") === "true"
  state playground_menuLabel = ctx.url.searchParams.get("pg_menuLabel") ?? "Dropdown"
  state playground_placement = ctx.url.searchParams.get("pg_placement") ?? "bottom-start"
  state playground_width = ctx.url.searchParams.get("pg_width") ?? "md"
  state playground_size = ctx.url.searchParams.get("pg_size") ?? "default"
  state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary"
  state playground_variant = ctx.url.searchParams.get("pg_variant") ?? "raised"
  state playground_closeOnSelect = (ctx.url.searchParams.get("pg_closeOnSelect") ?? "true") === "true"
  state playground_closeOnOutside = (ctx.url.searchParams.get("pg_closeOnOutside") ?? "true") === "true"
  state playground_disabled = (ctx.url.searchParams.get("pg_disabled") ?? "false") === "true"
  state playground_emptyLabel = ctx.url.searchParams.get("pg_emptyLabel") ?? "Dropdown"
  state playground_class = ctx.url.searchParams.get("pg_class") ?? "showcase-instance showcase-instance--1"
  seo {
    title = "Dropdown"
    description = "Open an accessible anchored menu with keyboard navigation, item selection, actions, and responsive placement."
  }
  view {
    <nav class="docs-breadcrumbs" aria-label="Breadcrumb">
      <a href="/">Components</a><span aria-hidden="true">/</span><a href="/overlays">Overlays</a><span aria-hidden="true">/</span><span>Dropdown</span>
    </nav>
    <header class="detail-hero">
      <div class="detail-hero-copy">
        <span class="showcase-eyebrow">Overlays component</span>
        <h1>Dropdown</h1>
        <p>Open an accessible anchored menu with keyboard navigation, item selection, actions, and responsive placement.</p>
        <div class="detail-badges"><span>17 props</span><span>4 slots</span><span>5 outputs</span><span>Theme ready</span><span>Responsive</span></div>
      </div>
      <div class="detail-hero-icon"><span class="icon-[lucide--component] size-10" aria-hidden="true"></span></div>
    </header>
    <section id="playground" class="detail-section playground-section" data-playground data-playground-component="Dropdown" data-playground-public-tag="true" data-playground-has-slot="true" data-playground-events="toggle,open,close,select,action">
      <div class="detail-section-heading"><span>Interactive playground</span><h2>Configure Dropdown</h2><p>Change any prop and inspect the server-rendered component immediately.</p></div>
      <div class="playground-workbench">
        <div class="playground-preview">
          <div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
          <div class="playground-preview-source" data-playground-preview><Dropdown items='{playground_items}' open='{playground_open}' defaultOpen='{playground_defaultOpen}' label='{playground_label}' icon='{playground_icon}' showChevron='{playground_showChevron}' menuLabel='{playground_menuLabel}' placement='{playground_placement}' width='{playground_width}' size='{playground_size}' color='{playground_color}' variant='{playground_variant}' closeOnSelect='{playground_closeOnSelect}' closeOnOutside='{playground_closeOnOutside}' disabled='{playground_disabled}' emptyLabel='{playground_emptyLabel}' class='{playground_class}' /></div>
          <section class="playground-code" aria-label="Current component code">
            <header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component code</span><button type="button" data-playground-copy><span class="icon-[lucide--copy] size-4" aria-hidden="true"></span>Copy</button></header>
            <pre><code data-playground-code>&lt;Dropdown
  items='[
    <span>&#123;</span>
      "id": "dropdown-0-1",
      "key": "dropdown-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": "#dropdown-demo",
      "actionHref": "#dropdown-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>&#123;</span>
          "label": "Nested option A",
          "value": "nested-a"
        <span>&#125;</span>,
        <span>&#123;</span>
          "label": "Nested option B",
          "value": "nested-b"
        <span>&#125;</span>
      ],
      "links": [
        <span>&#123;</span>
          "label": "Documentation",
          "href": "#documentation"
        <span>&#125;</span>,
        <span>&#123;</span>
          "label": "API reference",
          "href": "#api-reference"
        <span>&#125;</span>
      ],
      "values": [
        "Included",
        "Standard"
      ]
    <span>&#125;</span>,
    <span>&#123;</span>
      "id": "dropdown-0-2",
      "key": "dropdown-0-2",
      "value": "secondary",
      "label": "Additional option",
      "title": "Supporting example",
      "description": "A clean default configuration for everyday product interfaces.",
      "text": "Another configurable message.",
      "href": "#dropdown-demo",
      "actionHref": "#dropdown-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>&#123;</span>
          "label": "Nested option A",
          "value": "nested-a"
        <span>&#125;</span>,
        <span>&#123;</span>
          "label": "Nested option B",
          "value": "nested-b"
        <span>&#125;</span>
      ],
      "links": [
        <span>&#123;</span>
          "label": "Documentation",
          "href": "#documentation"
        <span>&#125;</span>,
        <span>&#123;</span>
          "label": "API reference",
          "href": "#api-reference"
        <span>&#125;</span>
      ],
      "values": [
        "Included",
        "Standard"
      ]
    <span>&#125;</span>
  ]'
  label="Dropdown"
  menuLabel="Dropdown"
  emptyLabel="Dropdown"&gt;
  &lt;div data-slot="trigger"&gt;
    &lt;div class="showcase-slot"&gt;trigger slot&lt;/div&gt;
  &lt;/div&gt;
  &lt;div data-slot="header"&gt;
    &lt;div class="showcase-slot"&gt;header slot&lt;/div&gt;
  &lt;/div&gt;
  &lt;div data-slot="footer"&gt;
    &lt;div class="showcase-slot"&gt;footer slot&lt;/div&gt;
  &lt;/div&gt;
&lt;/Dropdown&gt;</code></pre>
          </section>
          <div class="playground-status" data-playground-status aria-live="polite"></div>
          <div class="playground-event-log" data-playground-event-log aria-live="polite"><strong>Event output</strong><span>Interact with the preview to inspect the typed <code>payload</code>.</span></div>
        </div>
        <form class="playground-controls" data-playground-form>
          <header><div><span>Component props</span><strong>17 controls</strong></div><button type="reset"><span class="icon-[lucide--rotate-ccw] size-4" aria-hidden="true"></span>Reset</button></header>
          <div class="playground-fields"><label class="playground-field" for="playground-dropdown-items"><span><strong>items</strong><small>unknown[]</small></span><textarea id="playground-dropdown-items" name="pg_items" rows="5" spellcheck="false" data-playground-json>[
  &#123;
    "label": "Open dashboard",
    "description": "View the operational workspace",
    "value": "dashboard",
    "icon": "icon-[lucide--layout-dashboard]"
  &#125;,
  &#123;
    "label": "Share record",
    "value": "share",
    "icon": "icon-[lucide--share-2]",
    "shortcut": "Ctrl S"
  &#125;,
  &#123;
    "type": "divider"
  &#125;,
  &#123;
    "label": "Delete record",
    "value": "delete",
    "icon": "icon-[lucide--trash-2]",
    "danger": true
  &#125;
]</textarea><em data-playground-error></em></label><label class="playground-toggle" for="playground-dropdown-open"><span><strong>open</strong><small>boolean</small></span><input id="playground-dropdown-open" name="pg_open" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-dropdown-defaultOpen"><span><strong>default Open</strong><small>boolean</small></span><input id="playground-dropdown-defaultOpen" name="pg_defaultOpen" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-field" for="playground-dropdown-label"><span><strong>label</strong><small>string</small></span><input id="playground-dropdown-label" name="pg_label" type="text" value="Open playground menu" /></label><label class="playground-field" for="playground-dropdown-icon"><span><strong>icon</strong><small>string</small></span><input id="playground-dropdown-icon" name="pg_icon" type="text" value="" /></label><label class="playground-toggle" for="playground-dropdown-showChevron"><span><strong>show Chevron</strong><small>boolean</small></span><input id="playground-dropdown-showChevron" name="pg_showChevron" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-field" for="playground-dropdown-menuLabel"><span><strong>menu Label</strong><small>string</small></span><input id="playground-dropdown-menuLabel" name="pg_menuLabel" type="text" value="Dropdown" /></label><label class="playground-field" for="playground-dropdown-placement"><span><strong>placement</strong><small>string</small></span><select id="playground-dropdown-placement" name="pg_placement"><option value="bottom-start" selected>bottom-start</option><option value="top-start">top-start</option><option value="top-end">top-end</option><option value="bottom-end">bottom-end</option><option value="top">top</option><option value="right">right</option><option value="right-start">right-start</option><option value="right-end">right-end</option><option value="bottom">bottom</option><option value="left">left</option><option value="left-start">left-start</option><option value="left-end">left-end</option></select></label><label class="playground-field" for="playground-dropdown-width"><span><strong>width</strong><small>string</small></span><select id="playground-dropdown-width" name="pg_width"><option value="md" selected>md</option><option value="sm">sm</option><option value="lg">lg</option><option value="xl">xl</option><option value="full">full</option><option value="default">default</option><option value="compact">compact</option><option value="wide">wide</option></select></label><label class="playground-field" for="playground-dropdown-size"><span><strong>size</strong><small>string</small></span><select id="playground-dropdown-size" name="pg_size"><option value="default" selected>default</option><option value="sm">sm</option><option value="lg">lg</option><option value="xs">xs</option><option value="md">md</option><option value="xl">xl</option><option value="icon">icon</option><option value="icon-xs">icon-xs</option><option value="icon-sm">icon-sm</option><option value="icon-lg">icon-lg</option></select></label><label class="playground-field" for="playground-dropdown-color"><span><strong>color</strong><small>string</small></span><select id="playground-dropdown-color" name="pg_color"><option value="primary" selected>primary</option><option value="secondary">secondary</option><option value="success">success</option><option value="warning">warning</option><option value="danger">danger</option><option value="info">info</option></select></label><label class="playground-field" for="playground-dropdown-variant"><span><strong>variant</strong><small>string</small></span><select id="playground-dropdown-variant" name="pg_variant"><option value="raised" selected>raised</option><option value="default">default</option><option value="soft">soft</option><option value="outline">outline</option></select></label><label class="playground-toggle" for="playground-dropdown-closeOnSelect"><span><strong>close On Select</strong><small>boolean</small></span><input id="playground-dropdown-closeOnSelect" name="pg_closeOnSelect" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-dropdown-closeOnOutside"><span><strong>close On Outside</strong><small>boolean</small></span><input id="playground-dropdown-closeOnOutside" name="pg_closeOnOutside" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-dropdown-disabled"><span><strong>disabled</strong><small>boolean</small></span><input id="playground-dropdown-disabled" name="pg_disabled" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-field" for="playground-dropdown-emptyLabel"><span><strong>empty Label</strong><small>string</small></span><input id="playground-dropdown-emptyLabel" name="pg_emptyLabel" type="text" value="Dropdown" /></label><label class="playground-field" for="playground-dropdown-class"><span><strong>class</strong><small>string</small></span><input id="playground-dropdown-class" name="pg_class" type="text" value="showcase-instance showcase-instance--1" /></label></div>
        </form>
      </div>
    </section>
    <div class="detail-layout">
      <main class="detail-content">
        <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>Action dropdown</h2><p>Group related actions behind one compact trigger.</p></div>
          <span class="demo-case-number">01</span>
        </header>
        <div class="demo-workbench">
          <div id="dropdown-demo-1" class="demo-canvas demo-canvas--1">
            <div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
            <p class="demo-interaction-hint"><span class="icon-[lucide--mouse-pointer-click] size-4" aria-hidden="true"></span>Click the trigger to open the menu</p>
            <div class="demo-render"><Dropdown items='[{"label":"Open dashboard","description":"View the operational workspace","value":"dashboard","icon":"icon-[lucide--layout-dashboard]"},{"label":"Share record","value":"share","icon":"icon-[lucide--share-2]","shortcut":"Ctrl S"},{"type":"divider"},{"label":"Delete record","value":"delete","icon":"icon-[lucide--trash-2]","danger":true}]' open="false" defaultOpen="false" label="Open actions" icon="icon-[lucide--menu]" showChevron="true" menuLabel="Dropdown" placement="bottom-start" width="lg" size="default" variant="raised" closeOnSelect="true" closeOnOutside="true" disabled="false" emptyLabel="Dropdown" class="showcase-instance showcase-instance--1" /></div>
          </div>
          <section class="demo-code" aria-label="Action dropdown usage">
            <header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
            <pre><code>&lt;Dropdown
  items='[
    <span>&#123;</span>
      "label": "Open dashboard",
      "description": "View the operational workspace",
      "value": "dashboard",
      "icon": "icon-[lucide--layout-dashboard]"
    <span>&#125;</span>,
    <span>&#123;</span>
      "label": "Share record",
      "value": "share",
      "icon": "icon-[lucide--share-2]",
      "shortcut": "Ctrl S"
    <span>&#125;</span>,
    <span>&#123;</span>
      "type": "divider"
    <span>&#125;</span>,
    <span>&#123;</span>
      "label": "Delete record",
      "value": "delete",
      "icon": "icon-[lucide--trash-2]",
      "danger": true
    <span>&#125;</span>
  ]'
  label="Open actions"
  icon="icon-[lucide--menu]"
  menuLabel="Dropdown"
  width="lg"
  emptyLabel="Dropdown"&gt;
  &lt;div data-slot="trigger"&gt;
    &lt;div class="showcase-slot"&gt;trigger slot&lt;/div&gt;
  &lt;/div&gt;
  &lt;div data-slot="header"&gt;
    &lt;div class="showcase-slot"&gt;header slot&lt;/div&gt;
  &lt;/div&gt;
  &lt;div data-slot="footer"&gt;
    &lt;div class="showcase-slot"&gt;footer slot&lt;/div&gt;
  &lt;/div&gt;
&lt;/Dropdown&gt;</code></pre>
          </section>
        </div>
      </article>
      <article class="demo-case">
        <header class="demo-case-header">
          <div><span class="demo-case-eyebrow">Compact</span><h2>Compact overflow menu</h2><p>Use an icon-led compact menu in tables, cards, and toolbars.</p></div>
          <span class="demo-case-number">02</span>
        </header>
        <div class="demo-workbench">
          <div id="dropdown-demo-2" class="demo-canvas demo-canvas--2">
            <div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
            <p class="demo-interaction-hint"><span class="icon-[lucide--mouse-pointer-click] size-4" aria-hidden="true"></span>Click the trigger to open the menu</p>
            <div class="demo-render"><Dropdown items='[{"label":"Open dashboard","description":"View the operational workspace","value":"dashboard","icon":"icon-[lucide--layout-dashboard]"},{"label":"Share record","value":"share","icon":"icon-[lucide--share-2]","shortcut":"Ctrl S"},{"type":"divider"},{"label":"Delete record","value":"delete","icon":"icon-[lucide--trash-2]","danger":true}]' open="false" defaultOpen="false" label="More actions" icon="icon-[lucide--ellipsis]" showChevron="false" menuLabel="Compact example" width="sm" size="sm" variant="soft" closeOnSelect="true" closeOnOutside="true" disabled="false" emptyLabel="Compact example" class="showcase-instance showcase-instance--2" /></div>
          </div>
          <section class="demo-code" aria-label="Compact overflow menu usage">
            <header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
            <pre><code>&lt;Dropdown
  items='[
    <span>&#123;</span>
      "label": "Open dashboard",
      "description": "View the operational workspace",
      "value": "dashboard",
      "icon": "icon-[lucide--layout-dashboard]"
    <span>&#125;</span>,
    <span>&#123;</span>
      "label": "Share record",
      "value": "share",
      "icon": "icon-[lucide--share-2]",
      "shortcut": "Ctrl S"
    <span>&#125;</span>,
    <span>&#123;</span>
      "type": "divider"
    <span>&#125;</span>,
    <span>&#123;</span>
      "label": "Delete record",
      "value": "delete",
      "icon": "icon-[lucide--trash-2]",
      "danger": true
    <span>&#125;</span>
  ]'
  label="More actions"
  icon="icon-[lucide--ellipsis]"
  showChevron="false"
  menuLabel="Compact example"
  width="sm"
  size="sm"
  variant="soft"
  emptyLabel="Compact example"&gt;
  &lt;div data-slot="trigger"&gt;
    &lt;div class="showcase-slot"&gt;trigger slot&lt;/div&gt;
  &lt;/div&gt;
  &lt;div data-slot="header"&gt;
    &lt;div class="showcase-slot"&gt;header slot&lt;/div&gt;
  &lt;/div&gt;
  &lt;div data-slot="footer"&gt;
    &lt;div class="showcase-slot"&gt;footer slot&lt;/div&gt;
  &lt;/div&gt;
&lt;/Dropdown&gt;</code></pre>
          </section>
        </div>
      </article>
      <article class="demo-case">
        <header class="demo-case-header">
          <div><span class="demo-case-eyebrow">Advanced</span><h2>Detailed action menu</h2><p>Open the menu from its trigger to preview placement, descriptions, shortcuts, danger states, and event output.</p></div>
          <span class="demo-case-number">03</span>
        </header>
        <div class="demo-workbench">
          <div id="dropdown-demo-3" class="demo-canvas demo-canvas--3">
            <div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
            <p class="demo-interaction-hint"><span class="icon-[lucide--mouse-pointer-click] size-4" aria-hidden="true"></span>Click the trigger to open the menu</p>
            <div class="demo-render"><Dropdown items='[{"label":"Open dashboard","description":"View the operational workspace","value":"dashboard","icon":"icon-[lucide--layout-dashboard]"},{"label":"Share record","value":"share","icon":"icon-[lucide--share-2]","shortcut":"Ctrl S"},{"type":"divider"},{"label":"Delete record","value":"delete","icon":"icon-[lucide--trash-2]","danger":true}]' open="false" defaultOpen="false" label="Review detailed menu" icon="icon-[lucide--trash-2]" showChevron="true" menuLabel="Advanced example" placement="bottom-end" width="xl" size="lg" variant="raised" closeOnSelect="true" closeOnOutside="true" disabled="false" emptyLabel="Advanced example" class="showcase-instance showcase-instance--3" /></div>
          </div>
          <section class="demo-code" aria-label="Detailed action menu usage">
            <header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
            <pre><code>&lt;Dropdown
  items='[
    <span>&#123;</span>
      "label": "Open dashboard",
      "description": "View the operational workspace",
      "value": "dashboard",
      "icon": "icon-[lucide--layout-dashboard]"
    <span>&#125;</span>,
    <span>&#123;</span>
      "label": "Share record",
      "value": "share",
      "icon": "icon-[lucide--share-2]",
      "shortcut": "Ctrl S"
    <span>&#125;</span>,
    <span>&#123;</span>
      "type": "divider"
    <span>&#125;</span>,
    <span>&#123;</span>
      "label": "Delete record",
      "value": "delete",
      "icon": "icon-[lucide--trash-2]",
      "danger": true
    <span>&#125;</span>
  ]'
  label="Review detailed menu"
  icon="icon-[lucide--trash-2]"
  menuLabel="Advanced example"
  placement="bottom-end"
  width="xl"
  size="lg"
  emptyLabel="Advanced example"&gt;
  &lt;div data-slot="trigger"&gt;
    &lt;div class="showcase-slot"&gt;trigger slot&lt;/div&gt;
  &lt;/div&gt;
  &lt;div data-slot="header"&gt;
    &lt;div class="showcase-slot"&gt;header slot&lt;/div&gt;
  &lt;/div&gt;
  &lt;div data-slot="footer"&gt;
    &lt;div class="showcase-slot"&gt;footer slot&lt;/div&gt;
  &lt;/div&gt;
&lt;/Dropdown&gt;</code></pre>
          </section>
        </div>
      </article></div></section>
        <section id="events" class="detail-section"><div class="detail-section-heading"><span>Component outputs</span><h2>Receive every typed component output</h2><p>Use declarative output handlers in <code>.wrn</code> files or register a direct output handler from JavaScript. The canonical API exposes <code>payload</code> and does not require <code>event.detail</code>.</p></div><div class="detail-events-grid"><div class="detail-events-list"><div><code>@toggle</code><span>Fires when the component changes between open and closed or on and off states.</span></div><div><code>@open</code><span>Fires after the component opens.</span></div><div><code>@close</code><span>Fires after the component closes.</span></div><div><code>@select</code><span>Fires when an item, option, card, or result is selected.</span></div><div><code>@action</code><span>Fires when the component's primary or item action is activated.</span></div></div><div class="detail-event-examples"><section class="demo-code"><header><span><span class="icon-[lucide--braces] size-4" aria-hidden="true"></span>Declarative handlers</span><small>.wrn</small></header><pre><code>&lt;Dropdown
  @toggle='console.log(payload)'
  @open='console.log(payload)'
  @close='console.log(payload)'
  @select='console.log(payload)'
  @action='console.log(payload)'
/&gt;</code></pre></section><section class="demo-code"><header><span><span class="icon-[lucide--radio] size-4" aria-hidden="true"></span>Direct output handlers</span><small>.js</small></header><pre><code>import <span>&#123;</span> registerOutputHandler <span>&#125;</span> from "@wrnexus/csr/outputs"

const component = document.querySelector("[data-ui-component=\"Dropdown\"], [data-component=\"Dropdown\"]")

if (component) registerOutputHandler(component, "toggle", (payload) =&gt; <span>&#123;</span>
  console.log("toggle", payload)
<span>&#125;</span>)

if (component) registerOutputHandler(component, "open", (payload) =&gt; <span>&#123;</span>
  console.log("open", payload)
<span>&#125;</span>)

if (component) registerOutputHandler(component, "close", (payload) =&gt; <span>&#123;</span>
  console.log("close", payload)
<span>&#125;</span>)

if (component) registerOutputHandler(component, "select", (payload) =&gt; <span>&#123;</span>
  console.log("select", payload)
<span>&#125;</span>)

if (component) registerOutputHandler(component, "action", (payload) =&gt; <span>&#123;</span>
  console.log("action", payload)
<span>&#125;</span>)</code></pre></section></div></div></section>
        <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>items</code></td><td>unknown[]</td><td><code>[]</code></td><td>No</td></tr><tr><td><code>open</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>defaultOpen</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>label</code></td><td>string</td><td><code>"Open menu"</code></td><td>No</td></tr><tr><td><code>icon</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>showChevron</code></td><td>boolean</td><td><code>true</code></td><td>No</td></tr><tr><td><code>menuLabel</code></td><td>string</td><td><code>"Dropdown menu"</code></td><td>No</td></tr><tr><td><code>placement</code></td><td>string</td><td><code>"bottom-start"</code></td><td>No</td></tr><tr><td><code>width</code></td><td>string</td><td><code>"md"</code></td><td>No</td></tr><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>variant</code></td><td>string</td><td><code>"raised"</code></td><td>No</td></tr><tr><td><code>closeOnSelect</code></td><td>boolean</td><td><code>true</code></td><td>No</td></tr><tr><td><code>closeOnOutside</code></td><td>boolean</td><td><code>true</code></td><td>No</td></tr><tr><td><code>disabled</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>emptyLabel</code></td><td>string</td><td><code>"No menu items"</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="#dropdown-demo-1">Action dropdown</a><a href="#dropdown-demo-2">Compact overflow menu</a><a href="#dropdown-demo-3">Detailed action menu</a><a href="#events">Outputs</a><a href="#api">Props API</a></div>
      </aside>
    </div>
    <nav class="detail-pagination">
      <a href="/components/drawer"><small>Previous</small><strong>← Drawer</strong></a>
      <a href="/components/modal"><small>Next</small><strong>Modal →</strong></a>
    </nav>
  }
}
