Skip to content

Overlays & menus

Every overlay in this family is a Reka UI primitive whose content is portalled into <body>. None relies on a native <dialog>, the Popover API or a title tooltip, so focus handling, stacking and styling are the same in every browser. Portalled panels copy the flavor and accent of the nearest NwProvider onto themselves, so a dialog opened from a lumen scope stays lumen even though it renders at the end of <body>.

Root components (NwDialog, NwPopover, NwDropdownMenu, …) forward every Reka root prop and emit, including v-model:open. Triggers, closes and anchors are unstyled and accept as-child, so an NwButton can be the trigger. Every styled part takes class, merged with cn().

A modal window for a focused task, wrapping Reka Dialog. NwDialogContent renders the portal, a blurred backdrop and a cut-corner panel with a wire hairline along its top edge, plus a close button in the top-end corner.

No decision yet
DialogDemo.vue
<script setup lang="ts">
import { ref } from 'vue'
import {
NwButton,
NwDialog,
NwDialogBody,
NwDialogClose,
NwDialogContent,
NwDialogDescription,
NwDialogFooter,
NwDialogHeader,
NwDialogTitle,
NwDialogTrigger,
NwProvider,
} from '@nyxwire/vue'
const open = ref(false)
const answer = ref('No decision yet')
</script>
<template>
<NwProvider>
<div class="flex flex-wrap items-center gap-4">
<NwDialog v-model:open="open">
<NwDialogTrigger as-child>
<NwButton>Review failover</NwButton>
</NwDialogTrigger>
<NwDialogContent>
<NwDialogHeader>
<NwDialogTitle>Fail over relay fra-02</NwDialogTitle>
<NwDialogDescription
>Traffic moves to ams-01 while fra-02 drains its sessions.</NwDialogDescription
>
</NwDialogHeader>
<NwDialogBody>
<p class="text-fg-muted">
312 sessions reconnect within 40 seconds. Latency for eu-central rises by about 9 ms
until fra-02 is back.
</p>
</NwDialogBody>
<NwDialogFooter>
<NwDialogClose as-child>
<NwButton variant="ghost" intent="neutral" @click="answer = 'Postponed'"
>Postpone</NwButton
>
</NwDialogClose>
<NwDialogClose as-child>
<NwButton @click="answer = 'Failover started'">Start failover</NwButton>
</NwDialogClose>
</NwDialogFooter>
</NwDialogContent>
</NwDialog>
<output class="text-sm text-fg-muted">{{ answer }}</output>
</div>
</NwProvider>
</template>
Anatomy
NwDialog
├─ NwDialogTrigger
└─ NwDialogContent
├─ NwDialogHeader
│ ├─ NwDialogTitle
│ └─ NwDialogDescription
├─ NwDialogBody
└─ NwDialogFooter
└─ NwDialogClose
NwDialogContent prop Type Default Effect
size 'sm' | 'md' | 'lg' | 'xl' | 'full' 'md' Maximum width 24rem, 32rem, 48rem, 64rem, or the whole viewport without cuts
showClose boolean true Renders the icon close button
closeLabel string 'Close' Accessible name of the close button
class HTMLAttributes['class'] none Merged onto the panel

NwDialog takes Reka’s open, defaultOpen and modal. The other Reka DialogContent props and emits (@escape-key-down, @pointer-down-outside, …) pass through. The body scrolls on its own when the panel reaches the viewport height.

Keyboard and accessibility. The panel has role="dialog", labelled by the title and described by the description. Opening focuses the first focusable element; Tab and Shift+Tab stay inside; Escape or a click on the backdrop closes it and returns focus to the trigger.

A confirmation that interrupts, wrapping Reka AlertDialog. It has no close button, cannot be dismissed by clicking outside, and focus starts on the safe choice.

4 edge nodes online
AlertDialogDemo.vue
<script setup lang="ts">
import { ref } from 'vue'
import {
NwAlertDialog,
NwAlertDialogAction,
NwAlertDialogCancel,
NwAlertDialogContent,
NwAlertDialogDescription,
NwAlertDialogFooter,
NwAlertDialogHeader,
NwAlertDialogTitle,
NwAlertDialogTrigger,
NwButton,
NwProvider,
} from '@nyxwire/vue'
const nodes = ref(4)
</script>
<template>
<NwProvider>
<div class="flex flex-wrap items-center gap-4">
<NwAlertDialog>
<NwAlertDialogTrigger as-child>
<NwButton intent="danger" variant="outline" :disabled="nodes === 0"
>Decommission node</NwButton
>
</NwAlertDialogTrigger>
<NwAlertDialogContent intent="danger">
<NwAlertDialogHeader>
<NwAlertDialogTitle>Decommission edge node?</NwAlertDialogTitle>
<NwAlertDialogDescription
>Its keys are revoked and its routes are dropped. This cannot be
undone.</NwAlertDialogDescription
>
</NwAlertDialogHeader>
<NwAlertDialogFooter>
<NwAlertDialogCancel>Keep node</NwAlertDialogCancel>
<NwAlertDialogAction intent="danger" @click="nodes -= 1"
>Decommission</NwAlertDialogAction
>
</NwAlertDialogFooter>
</NwAlertDialogContent>
</NwAlertDialog>
<output class="text-sm text-fg-muted">{{ nodes }} edge nodes online</output>
</div>
</NwProvider>
</template>
Anatomy
NwAlertDialog
├─ NwAlertDialogTrigger
└─ NwAlertDialogContent
├─ NwAlertDialogHeader
│ ├─ NwAlertDialogTitle
│ └─ NwAlertDialogDescription
└─ NwAlertDialogFooter
├─ NwAlertDialogCancel
└─ NwAlertDialogAction
Part Prop Type Default Effect
NwAlertDialogContent size 'sm' | 'md' | 'lg' 'sm' Maximum width 24rem, 32rem or 48rem
intent 'primary' | 'secondary' | 'tertiary' | 'neutral' | 'info' | 'success' | 'warning' | 'danger' 'primary' Colors the top hairline (primary is the wire gradient)
NwAlertDialogAction intent same as above 'primary' Color of the solid confirming button
NwAlertDialogCancel class HTMLAttributes['class'] none A ghost button

Keyboard and accessibility. The panel has role="alertdialog" with its description. NwAlertDialogCancel receives focus when it opens, so Enter never confirms by accident. Escape closes it and restores focus; a pointer down outside does not. The action runs its click handler, then closes the dialog.

A dialog docked to an edge of the viewport, for settings and secondary panels. Only NwSheetContent differs from the dialog: NwSheet, NwSheetTrigger, NwSheetHeader, NwSheetBody, NwSheetFooter, NwSheetTitle, NwSheetDescription and NwSheetClose are the dialog parts under sheet names. The wire hairline runs along the edge that faces the page.

SheetDemo.vue
<script setup lang="ts">
import {
NwButton,
NwProvider,
NwSheet,
NwSheetBody,
NwSheetClose,
NwSheetContent,
NwSheetDescription,
NwSheetFooter,
NwSheetHeader,
NwSheetTitle,
NwSheetTrigger,
} from '@nyxwire/vue'
const sides = ['left', 'right'] as const
</script>
<template>
<NwProvider>
<div class="flex flex-wrap items-center gap-3">
<NwSheet v-for="side in sides" :key="side">
<NwSheetTrigger as-child>
<NwButton variant="outline">Uplinks ({{ side }})</NwButton>
</NwSheetTrigger>
<NwSheetContent :side="side">
<NwSheetHeader>
<NwSheetTitle>Uplinks</NwSheetTitle>
<NwSheetDescription>Four uplinks configured, one degraded.</NwSheetDescription>
</NwSheetHeader>
<NwSheetBody>
<ul class="grid gap-2 text-sm text-fg-muted">
<li>ams-01: 10 Gbit/s, healthy</li>
<li>fra-02: 10 Gbit/s, draining</li>
<li>hel-01: 1 Gbit/s, healthy</li>
<li>waw-03: 1 Gbit/s, packet loss 2%</li>
</ul>
</NwSheetBody>
<NwSheetFooter>
<NwSheetClose as-child>
<NwButton>Done</NwButton>
</NwSheetClose>
</NwSheetFooter>
</NwSheetContent>
</NwSheet>
</div>
</NwProvider>
</template>
NwSheetContent prop Type Default Effect
side 'top' | 'right' | 'bottom' | 'left' 'right' Edge it docks to; side panels are at most 26rem wide, top and bottom 85dvh
showClose boolean true Renders the icon close button
closeLabel string 'Close' Accessible name of the close button
class HTMLAttributes['class'] none Merged onto the panel

Keyboard behavior is the dialog’s: focus is trapped, and Escape or the close button closes the sheet and returns focus to the trigger.

A swipeable panel, wrapping Reka Drawer. It slides from the bottom by default and follows the pointer while it is dragged. NwDrawerBody and NwDrawerFooter are the dialog’s layout parts under drawer names.

DrawerDemo.vue
<script setup lang="ts">
import {
NwButton,
NwDrawer,
NwDrawerBody,
NwDrawerClose,
NwDrawerContent,
NwDrawerDescription,
NwDrawerFooter,
NwDrawerHeader,
NwDrawerTitle,
NwDrawerTrigger,
NwProvider,
} from '@nyxwire/vue'
</script>
<template>
<NwProvider>
<NwDrawer>
<NwDrawerTrigger as-child>
<NwButton variant="outline">Open incident log</NwButton>
</NwDrawerTrigger>
<NwDrawerContent show-close>
<NwDrawerHeader>
<NwDrawerTitle>Incident log</NwDrawerTitle>
<NwDrawerDescription
>Three open incidents. Swipe down or press Escape to close.</NwDrawerDescription
>
</NwDrawerHeader>
<NwDrawerBody>
<p class="text-fg-muted">
Packet loss on waw-03, a certificate expiring on hel-01, and a stalled config push.
</p>
</NwDrawerBody>
<NwDrawerFooter>
<NwDrawerClose as-child>
<NwButton>Done</NwButton>
</NwDrawerClose>
</NwDrawerFooter>
</NwDrawerContent>
</NwDrawer>
</NwProvider>
</template>
Anatomy
NwDrawer
├─ NwDrawerTrigger
└─ NwDrawerContent
├─ NwDrawerHandle (rendered for you unless show-handle is false)
├─ NwDrawerHeader
│ ├─ NwDrawerTitle
│ └─ NwDrawerDescription
├─ NwDrawerBody
└─ NwDrawerFooter
└─ NwDrawerClose
Part Prop Type Default Effect
NwDrawer swipeDirection 'down' | 'up' | 'left' | 'right' 'down' Edge and dismiss direction: bottom sheet, top sheet, side panels (Reka)
modal boolean | 'trap-focus' true 'trap-focus' keeps focus inside but lets the page take pointer input (Reka)
snapPoints (number | string)[] none Snap positions: fractions, pixels, or CSS lengths (Reka)
NwDrawerContent showHandle boolean true Renders the grab bar on the edge facing the page
showClose boolean false Renders an icon close button, useful without touch input
closeLabel string 'Close' Accessible name of the close button

The other Reka DrawerRoot props (v-model:open, v-model:snapPoint, snapToSequentialPoints) and DrawerContent emits pass through. The handle is decorative (aria-hidden).

Keyboard and accessibility. The drawer opens from its trigger as a described dialog; Escape closes it and restores focus. Swiping is pointer-only, so keep a close control (show-close or an NwDrawerClose) for keyboard users.

A non-modal, cut-corner panel anchored to its trigger, wrapping Reka Popover. Use it for small forms and details that do not need a dialog. It sits on the popover layer, so it also opens above a dialog.

Route not pinned
PopoverDemo.vue
<script setup lang="ts">
import { ref } from 'vue'
import {
NwButton,
NwPopover,
NwPopoverClose,
NwPopoverContent,
NwPopoverTrigger,
NwProvider,
} from '@nyxwire/vue'
const pinned = ref(false)
</script>
<template>
<NwProvider>
<div class="flex flex-wrap items-center gap-4">
<NwPopover>
<NwPopoverTrigger as-child>
<NwButton variant="outline">Route details</NwButton>
</NwPopoverTrigger>
<NwPopoverContent aria-label="Route details" arrow show-close class="grid gap-2">
<p class="font-display font-semibold">ams-01 to hel-01</p>
<p class="text-sm text-fg-muted">Four hops, 23 ms round trip, MTU 1500.</p>
<NwPopoverClose as-child>
<NwButton size="sm" @click="pinned = true">Pin route</NwButton>
</NwPopoverClose>
</NwPopoverContent>
</NwPopover>
<output class="text-sm text-fg-muted">{{
pinned ? 'Route pinned' : 'Route not pinned'
}}</output>
</div>
</NwProvider>
</template>
Anatomy
NwPopover
├─ NwPopoverAnchor (optional: position against another element)
├─ NwPopoverTrigger
└─ NwPopoverContent
└─ NwPopoverClose (optional)
NwPopoverContent prop Type Default Effect
size 'sm' | 'md' | 'lg' 'md' Minimum width 12rem, 16rem or 22rem
variant 'solid' | 'glass' 'solid' glass blurs what is behind the panel
arrow boolean false Draws an arrow pointing at the trigger
showClose boolean false Renders an icon close button in the top-end corner
closeLabel string 'Close' Accessible name of the close button
sideOffset number 6 Distance from the trigger in px (Reka)
arrowPadding number 12 Keeps the arrow away from the cut corners (Reka)
class HTMLAttributes['class'] none Merged onto the panel

side, align, collision options and the other Reka PopoverContent props and emits pass through.

Keyboard and accessibility. The trigger toggles aria-expanded; opening moves focus into the content, and Escape closes it and returns focus to the trigger. Give the content an aria-label or a heading.

A short label shown on hover or keyboard focus, wrapping Reka Tooltip. It relies on the TooltipProvider inside NwProvider, whose tooltip-delay (300 ms) sets the opening delay; never add a second provider.

TooltipDemo.vue
<script setup lang="ts">
import { RefreshCw } from '@lucide/vue'
import { NwButton, NwProvider, NwTooltip, NwTooltipContent, NwTooltipTrigger } from '@nyxwire/vue'
</script>
<template>
<NwProvider>
<div class="flex flex-wrap items-center gap-3">
<NwTooltip>
<NwTooltipTrigger as-child>
<NwButton variant="outline" icon aria-label="Resync routes">
<RefreshCw aria-hidden="true" />
</NwButton>
</NwTooltipTrigger>
<NwTooltipContent>Resync routes (R)</NwTooltipContent>
</NwTooltip>
<NwTooltip>
<NwTooltipTrigger as-child>
<NwButton variant="ghost">Traffic replay</NwButton>
</NwTooltipTrigger>
<NwTooltipContent side="bottom">Available on capture-enabled relays</NwTooltipContent>
</NwTooltip>
</div>
</NwProvider>
</template>
Anatomy
NwTooltip
├─ NwTooltipTrigger
└─ NwTooltipContent
NwTooltipContent prop Type Default Effect
arrow boolean true Draws an arrow pointing at the trigger
sideOffset number 6 Distance from the trigger in px (Reka)
arrowPadding number 8 Keeps the arrow off the corners (Reka)
class HTMLAttributes['class'] none Merged onto the bubble

NwTooltip forwards Reka’s root props, such as delayDuration and disabled.

Keyboard and accessibility. Keyboard focus opens the tooltip, and the tooltip describes its trigger. Escape hides it while the trigger keeps focus. Put only a label in a tooltip; an icon-only trigger still needs its own aria-label.

A preview card for sighted pointer users, wrapping Reka HoverCard: it opens after the pointer rests on the trigger (700 ms) and closes 300 ms after it leaves.

Primary route through relay ams-01

HoverCardDemo.vue
<script setup lang="ts">
import { NwHoverCard, NwHoverCardContent, NwHoverCardTrigger, NwProvider } from '@nyxwire/vue'
</script>
<template>
<NwProvider>
<p class="text-sm text-fg-muted">
Primary route through
<NwHoverCard>
<NwHoverCardTrigger href="#nwhovercard" class="text-link underline underline-offset-4"
>relay ams-01</NwHoverCardTrigger
>
<NwHoverCardContent arrow class="grid gap-1">
<p class="font-display font-semibold text-fg">ams-01</p>
<p class="text-sm text-fg-muted">
Amsterdam edge, eu-west. 1,204 sessions, 38% load, uptime 41 days.
</p>
</NwHoverCardContent>
</NwHoverCard>
</p>
</NwProvider>
</template>
Anatomy
NwHoverCard
├─ NwHoverCardTrigger (renders a link)
└─ NwHoverCardContent
NwHoverCardContent prop Type Default Effect
variant 'solid' | 'glass' 'solid' glass blurs what is behind the card
arrow boolean false Draws an arrow pointing at the trigger
sideOffset number 8 Distance from the trigger in px (Reka)
arrowPadding number 12 Keeps the arrow off the corners (Reka)
class HTMLAttributes['class'] none Merged onto the card

NwHoverCard forwards Reka’s openDelay, closeDelay and the other root props.

Keyboard and accessibility. Keyboard focus on the trigger opens the card too. The card is supplementary: put nothing in it that is not reachable elsewhere.

A menu of actions opened from a button, wrapping Reka DropdownMenu, with items, checkbox and radio items, labels, groups, separators, shortcuts and submenus. A highlighted item gets the primary soft fill and a primary rail on its inline-start edge.

Last action: none · monitoring: true · tier: standard
DropdownMenuDemo.vue
<script setup lang="ts">
import { ref } from 'vue'
import {
NwButton,
NwDropdownMenu,
NwDropdownMenuCheckboxItem,
NwDropdownMenuContent,
NwDropdownMenuGroup,
NwDropdownMenuItem,
NwDropdownMenuLabel,
NwDropdownMenuRadioGroup,
NwDropdownMenuRadioItem,
NwDropdownMenuSeparator,
NwDropdownMenuShortcut,
NwDropdownMenuSub,
NwDropdownMenuSubContent,
NwDropdownMenuSubTrigger,
NwDropdownMenuTrigger,
NwProvider,
} from '@nyxwire/vue'
const last = ref('none')
const monitored = ref(true)
const tier = ref('standard')
</script>
<template>
<NwProvider>
<div class="flex flex-wrap items-center gap-4">
<NwDropdownMenu>
<NwDropdownMenuTrigger as-child>
<NwButton variant="outline">Relay actions</NwButton>
</NwDropdownMenuTrigger>
<NwDropdownMenuContent>
<NwDropdownMenuLabel>Relay fra-02</NwDropdownMenuLabel>
<NwDropdownMenuGroup>
<NwDropdownMenuItem @select="last = 'restarted'">
Restart
<NwDropdownMenuShortcut>Ctrl+R</NwDropdownMenuShortcut>
</NwDropdownMenuItem>
<NwDropdownMenuItem disabled>Promote to primary</NwDropdownMenuItem>
<NwDropdownMenuSub>
<NwDropdownMenuSubTrigger>Move to region</NwDropdownMenuSubTrigger>
<NwDropdownMenuSubContent>
<NwDropdownMenuItem @select="last = 'moved to eu-west'">eu-west</NwDropdownMenuItem>
<NwDropdownMenuItem @select="last = 'moved to eu-north'"
>eu-north</NwDropdownMenuItem
>
</NwDropdownMenuSubContent>
</NwDropdownMenuSub>
</NwDropdownMenuGroup>
<NwDropdownMenuSeparator />
<NwDropdownMenuCheckboxItem v-model="monitored">Monitoring</NwDropdownMenuCheckboxItem>
<NwDropdownMenuSeparator />
<NwDropdownMenuLabel>Tier</NwDropdownMenuLabel>
<NwDropdownMenuRadioGroup v-model="tier">
<NwDropdownMenuRadioItem value="standard">Standard</NwDropdownMenuRadioItem>
<NwDropdownMenuRadioItem value="priority">Priority</NwDropdownMenuRadioItem>
</NwDropdownMenuRadioGroup>
<NwDropdownMenuSeparator />
<NwDropdownMenuItem intent="danger" @select="last = 'drained'">Drain</NwDropdownMenuItem>
</NwDropdownMenuContent>
</NwDropdownMenu>
<output class="text-sm text-fg-muted"
>Last action: {{ last }} · monitoring: {{ monitored }} · tier: {{ tier }}</output
>
</div>
</NwProvider>
</template>
Anatomy
NwDropdownMenu
├─ NwDropdownMenuTrigger
└─ NwDropdownMenuContent
├─ NwDropdownMenuLabel
├─ NwDropdownMenuGroup
│ ├─ NwDropdownMenuItem
│ │ └─ NwDropdownMenuShortcut
│ └─ NwDropdownMenuSub
│ ├─ NwDropdownMenuSubTrigger
│ └─ NwDropdownMenuSubContent
├─ NwDropdownMenuSeparator
├─ NwDropdownMenuCheckboxItem
└─ NwDropdownMenuRadioGroup
└─ NwDropdownMenuRadioItem
Part Prop Type Default Effect
NwDropdownMenu modal boolean false true blocks outside interaction and hides the page from assistive tech
NwDropdownMenuContent, …SubContent variant 'solid' | 'glass' 'solid' glass blurs what is behind the menu
sideOffset number 4 Distance from the trigger (Reka)
NwDropdownMenuSubContent alignOffset number -5 Lines the first sub item up with its sub trigger (Reka)
NwDropdownMenuItem intent 'default' | 'danger' 'default' danger paints a destructive item
NwDropdownMenuItem, …Label, …SubTrigger inset boolean false Indents the label to line up with checkbox and radio items

Items emit @select; NwDropdownMenuCheckboxItem binds v-model (boolean) and NwDropdownMenuRadioGroup binds v-model (the selected value). The other Reka props and emits pass through.

modal defaults to false here, unlike in Reka: a modal menu sets aria-hidden on the rest of the page while its focusable trigger stays inside that hidden tree.

Keyboard. Enter, Space or ArrowDown on the trigger opens the menu on its first item. Arrow keys move between items and skip disabled ones; Enter selects. ArrowRight opens a submenu on its first item and ArrowLeft returns to the sub trigger. Escape or a pointer down outside closes the menu.

The same menu opened by a right-click (or a long press) on an area, wrapping Reka ContextMenu. Its parts mirror the dropdown’s under NwContextMenu* names, with NwContextMenuTrigger as the area.

Right-click this node tile Last action: none · muted: false
ContextMenuDemo.vue
<script setup lang="ts">
import { ref } from 'vue'
import {
NwContextMenu,
NwContextMenuCheckboxItem,
NwContextMenuContent,
NwContextMenuItem,
NwContextMenuLabel,
NwContextMenuSeparator,
NwContextMenuShortcut,
NwContextMenuSub,
NwContextMenuSubContent,
NwContextMenuSubTrigger,
NwContextMenuTrigger,
NwProvider,
} from '@nyxwire/vue'
const last = ref('none')
const muted = ref(false)
</script>
<template>
<NwProvider>
<div class="grid w-full max-w-md gap-3">
<NwContextMenu>
<NwContextMenuTrigger
class="flex h-28 items-center justify-center rounded-lg border border-dashed border-line-strong px-4 text-center text-sm text-fg-muted"
>
Right-click this node tile
</NwContextMenuTrigger>
<NwContextMenuContent>
<NwContextMenuLabel>Node hel-01</NwContextMenuLabel>
<NwContextMenuItem @select="last = 'pinged'">
Ping
<NwContextMenuShortcut>P</NwContextMenuShortcut>
</NwContextMenuItem>
<NwContextMenuSub>
<NwContextMenuSubTrigger>Copy</NwContextMenuSubTrigger>
<NwContextMenuSubContent>
<NwContextMenuItem @select="last = 'copied address'">Address</NwContextMenuItem>
<NwContextMenuItem @select="last = 'copied key fingerprint'"
>Key fingerprint</NwContextMenuItem
>
</NwContextMenuSubContent>
</NwContextMenuSub>
<NwContextMenuSeparator />
<NwContextMenuCheckboxItem v-model="muted">Mute alerts</NwContextMenuCheckboxItem>
<NwContextMenuSeparator />
<NwContextMenuItem intent="danger" @select="last = 'isolated'">Isolate</NwContextMenuItem>
</NwContextMenuContent>
</NwContextMenu>
<output class="text-sm text-fg-muted">Last action: {{ last }} · muted: {{ muted }}</output>
</div>
</NwProvider>
</template>
Anatomy
NwContextMenu
├─ NwContextMenuTrigger (the area that listens for right-click)
└─ NwContextMenuContent
└─ same items as NwDropdownMenuContent, prefixed NwContextMenu

The props match the dropdown menu’s: modal defaults to false; content and sub content take variant; items take intent and inset; labels and sub triggers take inset; sub content defaults to sideOffset 4 and alignOffset -5. The content itself opens at the pointer, so it has no sideOffset default.

Keyboard. The menu opens next to the pointer. ArrowDown focuses the first item, Enter selects, ArrowRight and ArrowLeft open and close submenus, Escape closes. A right-click has no keyboard equivalent on every platform, so offer every context action somewhere else as well.

A horizontal row of menus, as in a desktop application, wrapping Reka Menubar. Each NwMenubarMenu has a trigger and its content; v-model on NwMenubar holds the value of the open menu.

Last action: none · latency: true · range: 1h
MenubarDemo.vue
<script setup lang="ts">
import { ref } from 'vue'
import {
NwMenubar,
NwMenubarCheckboxItem,
NwMenubarContent,
NwMenubarItem,
NwMenubarLabel,
NwMenubarMenu,
NwMenubarRadioGroup,
NwMenubarRadioItem,
NwMenubarSeparator,
NwMenubarShortcut,
NwMenubarSub,
NwMenubarSubContent,
NwMenubarSubTrigger,
NwMenubarTrigger,
NwProvider,
} from '@nyxwire/vue'
const last = ref('none')
const showLatency = ref(true)
const range = ref('1h')
</script>
<template>
<NwProvider>
<div class="grid gap-3">
<NwMenubar>
<NwMenubarMenu value="topology">
<NwMenubarTrigger>Topology</NwMenubarTrigger>
<NwMenubarContent>
<NwMenubarItem @select="last = 'new snapshot'">
New snapshot
<NwMenubarShortcut>Ctrl+N</NwMenubarShortcut>
</NwMenubarItem>
<NwMenubarSub>
<NwMenubarSubTrigger>Open recent</NwMenubarSubTrigger>
<NwMenubarSubContent>
<NwMenubarItem @select="last = 'opened eu-west'">eu-west</NwMenubarItem>
<NwMenubarItem @select="last = 'opened eu-north'">eu-north</NwMenubarItem>
</NwMenubarSubContent>
</NwMenubarSub>
<NwMenubarSeparator />
<NwMenubarItem disabled>Export</NwMenubarItem>
</NwMenubarContent>
</NwMenubarMenu>
<NwMenubarMenu value="view">
<NwMenubarTrigger>View</NwMenubarTrigger>
<NwMenubarContent>
<NwMenubarCheckboxItem v-model="showLatency">Latency overlay</NwMenubarCheckboxItem>
<NwMenubarSeparator />
<NwMenubarLabel>Time range</NwMenubarLabel>
<NwMenubarRadioGroup v-model="range">
<NwMenubarRadioItem value="1h">Last hour</NwMenubarRadioItem>
<NwMenubarRadioItem value="24h">Last 24 hours</NwMenubarRadioItem>
</NwMenubarRadioGroup>
</NwMenubarContent>
</NwMenubarMenu>
</NwMenubar>
<output class="text-sm text-fg-muted"
>Last action: {{ last }} · latency: {{ showLatency }} · range: {{ range }}</output
>
</div>
</NwProvider>
</template>
Anatomy
NwMenubar
└─ NwMenubarMenu (value)
├─ NwMenubarTrigger
└─ NwMenubarContent
└─ same items as NwDropdownMenuContent, prefixed NwMenubar
Part Prop Type Default Effect
NwMenubar class HTMLAttributes['class'] none Merged onto the bar
NwMenubarContent variant 'solid' | 'glass' 'solid' glass blurs what is behind the menu
sideOffset number 6 Distance from the trigger (Reka)
align 'start' | 'center' | 'end' 'start' Aligns the menu with the trigger’s start edge (Reka)
NwMenubarSubContent sideOffset, alignOffset number 4, -5 Sub menu placement (Reka)
NwMenubarItem intent 'default' | 'danger' 'default' danger paints a destructive item
NwMenubarItem, …Label, …SubTrigger inset boolean false Indents the label

Keyboard and accessibility. The bar has the menubar role, and ArrowLeft and ArrowRight move between its triggers. Enter opens a menu on its first item; with a menu open, ArrowRight moves to the next menu. ArrowRight on a sub trigger opens its submenu, ArrowLeft closes it. Escape closes the open menu and returns focus to its trigger.

Short, non-blocking notifications, built on Reka Toast. Mount one NwToaster inside NwProvider (which holds Reka’s ToastProvider and the toast queue), then queue toasts with useToast. useToast() must run in a component rendered inside that provider, not in the one that renders it, which is why the demo splits its buttons into ToastControls.vue. Each toast is a cut-corner card with a glowing intent bar on its inline-start edge.

0 pushes live
ToastDemo.vue
<script setup lang="ts">
import { NwProvider, NwToaster } from '@nyxwire/vue'
import ToastControls from './ToastControls.vue'
</script>
<template>
<!-- useToast reads the queue of the nearest NwProvider, so it runs in a child component. -->
<NwProvider>
<NwToaster />
<ToastControls />
</NwProvider>
</template>
ToastControls.vue
<script setup lang="ts">
import { ref } from 'vue'
import { NwButton, useToast } from '@nyxwire/vue'
const { toast, dismiss } = useToast()
const pushes = ref(0)
function push(): void {
pushes.value += 1
toast({
title: 'Config pushed',
description: 'Routing table v42 is live on 12 relays.',
intent: 'success',
action: { label: 'Roll back', onClick: () => (pushes.value -= 1) },
})
}
</script>
<template>
<div class="flex flex-wrap items-center gap-3">
<NwButton @click="push">Push config</NwButton>
<NwButton
intent="warning"
variant="outline"
@click="
toast({
title: 'Latency rising',
description: 'eu-central is 30 ms above its baseline.',
intent: 'warning',
})
"
>
Warn
</NwButton>
<NwButton variant="ghost" intent="neutral" @click="dismiss()">Dismiss all</NwButton>
<output class="text-sm text-fg-muted">{{ pushes }} pushes live</output>
</div>
</template>
Anatomy (NwToaster renders one per queued toast)
NwToaster
├─ NwToast (intent, variant)
│ ├─ intent icon (info, success, warning, danger)
│ ├─ NwToastTitle
│ ├─ NwToastDescription
│ ├─ NwToastAction
│ └─ NwToastClose
└─ viewport (the notifications region)
NwToaster prop Type Default Effect
position 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center' 'bottom-right' Corner or edge the stack docks to; the newest toast sits nearest the edge
variant 'solid' | 'glass' 'solid' Surface of every toast
label string 'Notifications ({hotkey})' Name of the region; {hotkey} becomes the focus shortcut
closeLabel string 'Dismiss notification' Name of every close button
class HTMLAttributes['class'] none Merged onto the viewport

toast() takes title, description, intent, duration (ms, 0 keeps it until dismissed), action ({ label, onClick }) and icon, and returns the toast’s id; dismiss(id?) closes one toast or all of them. The default visible time is the NwProvider prop toast-duration (5000 ms). Each NwProvider owns its own queue, and the queue is cleared when its last toaster unmounts.

The parts are exported for a hand-built toast: NwToast takes intent ('primary', 'secondary', 'tertiary', 'neutral', 'info', 'success', 'warning', 'danger', default 'primary') and variant, plus Reka’s ToastRoot props such as v-model:open; NwToastClose takes label (default 'Dismiss notification'); NwToastAction takes Reka’s required alt-text.

Accessibility. Toasts are announced through a live region: danger and warning toasts interrupt (foreground), the others wait (background). Every toast has a labelled close button, and an action button runs its callback, then closes the toast. The hotkey in label (F8 by default in Reka) moves focus to the region. Toasts slide in from their edge and simply appear under prefers-reduced-motion: reduce.

A Nyxwire-only composite: a dialog with a search field over a filtered list of commands, built from NwDialog parts and Reka Listbox. Every word typed must match the command’s label or one of its keywords. Picking a command closes the palette and emits select with its value.

Ran: nothing yet
CommandPaletteDemo.vue
<script setup lang="ts">
import { ref } from 'vue'
import { NwCommandPalette, NwProvider, type NwCommand } from '@nyxwire/vue'
const commands: NwCommand[] = [
{ value: 'restart', label: 'Restart relay', keywords: ['reboot', 'reload'] },
{ value: 'drain', label: 'Drain sessions', keywords: ['maintenance'] },
{ value: 'rotate', label: 'Rotate keys', keywords: ['certificate', 'security'] },
{ value: 'export', label: 'Export topology', disabled: true },
]
const ran = ref('nothing yet')
</script>
<template>
<NwProvider>
<div class="flex flex-wrap items-center gap-4">
<NwCommandPalette
trigger-label="Run command"
:commands="commands"
@select="ran = commands.find((command) => command.value === $event)?.label ?? $event"
/>
<output class="text-sm text-fg-muted">Ran: {{ ran }}</output>
</div>
</NwProvider>
</template>
Anatomy
NwCommandPalette
├─ trigger (outline button from trigger-label, or the trigger slot)
└─ NwDialogContent
├─ NwDialogHeader (title, description)
└─ NwDialogBody
├─ search field (combobox)
├─ results (listbox of commands)
└─ empty status
Prop Type Default Effect
commands readonly NwCommand[] required { value, label, disabled?, keywords? } entries
open boolean false v-model:open; the query is cleared when the palette closes
title string 'Command palette' Dialog title, also the name of the results list
description string 'Search for a command to run.' Dialog description
triggerLabel string none Renders an outline trigger button; without it and the slot, no trigger
searchLabel string 'Search commands' Accessible name and placeholder of the search field
emptyText string 'No matching commands' Status text when nothing matches

Emits select with the chosen command’s value. Without a trigger, open it from your own shortcut by binding v-model:open.

Keyboard and accessibility. The search field is a combobox that controls the results listbox. ArrowDown and ArrowUp move through the results, skipping disabled commands, and Enter runs the highlighted one. The empty message is a status, so screen readers announce it. Escape closes the dialog and returns focus to the trigger.

  • Portals mount in <body>. Each panel copies the flavor and accent of the nearest NwProvider, so menus and dialogs keep a scoped flavor without extra setup.
  • Menus and popovers share the popover layer, so they open above dialogs; toasts use their own --nw-z-toast layer.
  • Pick variant="glass" for popovers, menus and toasts over busy backgrounds such as the circuit grid; solid keeps maximum contrast.
  • Keep a visible close control on drawers and toasts: swipe gestures are pointer-only.