// Generated by scripts/generate-showcase.mjs. Do not edit directly. page ContextMenuDetail { 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") ?? "Context Menu example" state playground_description = ctx.url.searchParams.get("pg_description") ?? "A polished default context menu 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") ?? "Context Menu" state playground_class = ctx.url.searchParams.get("pg_class") ?? "showcase-instance showcase-instance--1" seo { title = "Context Menu" description = "Theme-aware, responsive context menu component." } view {
Overlays component

Context Menu

Theme-aware, responsive context menu component.

8 props1 slots3 eventsTheme readyResponsive
Interactive playground

Configure Context Menu

Change any prop and inspect the server-rendered component immediately.

Live preview
Component code
<ContextMenu
  title="Context Menu example"
  description="A polished default context menu for a modern application."
  open="true"
  closeLabel="Context Menu"
/>
Component props8 controls
Live examples

Designed for real product surfaces

Compare configurations and resize the browser to check responsive behavior.

Recommended

Production default

Balanced spacing, hierarchy, and content for the most common product workflow.

01
Live preview
Component usage.wrn
<ContextMenu
  title="Context Menu example"
  description="A polished default context menu for a modern application."
  open="true"
  closeLabel="Context Menu"
/>
Dense UI

Compact application

A tighter variation for dashboards, side panels, tables, and operational interfaces.

02
Live preview
Component usage.wrn
<ContextMenu
  size="sm"
  title="Compact Context Menu"
  description="A compact configuration for dashboards and dense product surfaces."
  open="true"
  closeLabel="Compact example"
/>
Extended

Rich configuration

A more expressive variation using additional data, stronger emphasis, and optional states.

03
Live preview
Component usage.wrn
<ContextMenu
  size="lg"
  title="Advanced Context Menu"
  description="A richer configuration demonstrating additional content and hierarchy."
  open="true"
  closeLabel="Advanced example"
/>
Component events

Events

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.
Event listener.js
const component = document.querySelector('[data-wrn-events]')

component.addEventListener('open', (event) => {
  console.log(event.detail)
})
Component API

Props and configuration

All content and behavior shown above is supplied through these props and slots.

PropTypeDefaultRequired
sizestring"default"No
colorstring"primary"No
titlestring"Context Menu"No
descriptionstring""No
openbooleanfalseNo
placementstring"bottom"No
closeLabelstring"Close"No
classstring""No
} }