Production default
Balanced spacing, hierarchy, and content for the most common product workflow.
<Dropdown
title="Dropdown example"
description="A polished default dropdown for a modern application."
open="true"
closeLabel="Dropdown"
/>
// Generated by scripts/generate-showcase.mjs. Do not edit directly.
page DropdownDetail {
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") ?? "Dropdown example"
state playground_description = ctx.url.searchParams.get("pg_description") ?? "A polished default dropdown for a modern application."
state playground_open = ctx.url.searchParams.get("pg_open") ?? "true"
state playground_placement = ctx.url.searchParams.get("pg_placement") ?? "bottom"
state playground_closeLabel = ctx.url.searchParams.get("pg_closeLabel") ?? "Dropdown"
state playground_class = ctx.url.searchParams.get("pg_class") ?? "showcase-instance showcase-instance--1"
seo {
title = "Dropdown"
description = "Theme-aware, responsive dropdown component."
}
view {
Theme-aware, responsive dropdown component. Change any prop and inspect the server-rendered component immediately.Dropdown
Configure Dropdown
<Dropdown
title="Dropdown example"
description="A polished default dropdown for a modern application."
open="true"
closeLabel="Dropdown"
/>
Compare configurations and resize the browser to check responsive behavior.
Balanced spacing, hierarchy, and content for the most common product workflow.
<Dropdown
title="Dropdown example"
description="A polished default dropdown for a modern application."
open="true"
closeLabel="Dropdown"
/>
A tighter variation for dashboards, side panels, tables, and operational interfaces.
<Dropdown
size="sm"
title="Compact Dropdown"
description="A compact configuration for dashboards and dense product surfaces."
open="true"
closeLabel="Compact example"
/>
A more expressive variation using additional data, stronger emphasis, and optional states.
<Dropdown
size="lg"
title="Advanced Dropdown"
description="A richer configuration demonstrating additional content and hierarchy."
open="true"
closeLabel="Advanced example"
/>
Public events declared by this component. Custom events bubble from the component root and expose state through event.detail.
@openFires when the component opens.@closeFires when the component closes.@selectFires when an item or option is selected.@changeFires when the component value or selection changes.const component = document.querySelector('[data-wrn-events]')
component.addEventListener('open', (event) => {
console.log(event.detail)
})All content and behavior shown above is supplied through these props and slots.
| Prop | Type | Default | Required |
|---|---|---|---|
size | string | "default" | No |
color | string | "primary" | No |
title | string | "Dropdown" | No |
description | string | "" | No |
open | boolean | false | No |
placement | string | "bottom" | No |
closeLabel | string | "Close" | No |
class | string | "" | No |