@vuecs/overlays

Overlay components (Modal, Popover, Tooltip, DropdownMenu, ContextMenu) for vuecs, built on Reka UI primitives.
6,801 4
Install
npm install @vuecs/overlays
Latest Version:1.3.1
Vue:3
License:Apache-2.0
Last Updated:Oct 16, 2026
Links: GitHub  ·  npm
Maintainer: tada5hi

@vuecs/overlays

npm version CI license

Eight overlay families for vuecs — Modal, AlertDialog, Popover, HoverCard, Tooltip, DropdownMenu, ContextMenu, Toast — as thin themed wrappers over Reka UI primitives. Reka handles focus traps, dismiss layers, and positioning; vuecs handles the look, through whichever theme you install.

✨ What's inside

  • 🪟 Modal — with useModal(), a view-stack composable (pushView / popView / replaceView) for "list → detail → back" flows inside one modal instance. No stacked dialogs, no z-index fights.
  • ⚠️ AlertDialog — the role="alertdialog" confirmation primitive (outside-click off, distinct Cancel/Action buttons) plus useAlertDialog() — const ok = await confirm({ title, description, tone: 'error' }). A single <VCAlertDialogProvider> host drains a shared FIFO queue, the same way <VCToaster> drains useToast().
  • 🔔 Toast — with useToast(), an app-scoped queue (add / dismiss / update / clear), provided per-app so SSR requests stay isolated. Capture it from a component setup() and reuse the returned API anywhere (store, interceptor); every entry lands in the same <VCToaster> viewport.
  • 💬 Popover · HoverCard · Tooltip — positioned floating panels with arrows, grace-area hover (HoverCard), and provider-level config (Tooltip).
  • 📋 DropdownMenu · ContextMenu — the full menu surface: items, labels, separators, groups, checkbox items, radio groups, submenus.
  • 🎞️ Enter and exit animations — data-state-driven, with Reka's internal Presence delaying unmount until the exit animation completes. Works in every shipping theme.
  • 📦 Portals included — every *Content part bundles its portal; an inline prop bypasses it for tests or custom mounting.

📦 Installation

npm install @vuecs/overlays

⚡ Usage

<VCModal v-model:open="open">
    <VCModalTrigger as-child><VCButton>Open</VCButton></VCModalTrigger>
    <VCModalContent>
        <VCModalTitle>Confirm action</VCModalTitle>
        <VCModalDescription>This cannot be undone.</VCModalDescription>
        <VCModalClose>Cancel</VCModalClose>
    </VCModalContent>
</VCModal>
import { useToast } from '@vuecs/overlays';

const toast = useToast();
toast.add({ title: 'Saved', description: 'Your changes are live.', color: 'success' });
import { useAlertDialog } from '@vuecs/overlays';

const confirm = useAlertDialog();
// Place a single <VCAlertDialogProvider /> near your app root, then:
if (await confirm({ title: 'Delete project?', description: 'This cannot be undone.', tone: 'error' })) {
    await api.deleteProject(id);
}

⚖️ Bundle size

Wrapper-only deltas, measured from tree-shaken single-family builds:

Family Raw Gzipped
Tooltip 0.88 kB 0.55 kB
Popover 1.03 kB 0.62 kB
ContextMenu 1.42 kB 0.69 kB
DropdownMenu 1.54 kB 0.71 kB
Modal 3.38 kB 1.28 kB

The shared Reka + @vuecs/core infrastructure is a one-time cost amortised across every family you use; the full package (all 8 families + composables) is ~46 kB raw / ~5 kB gzipped before tree-shaking.

📚 Documentation

One page per family on vuecs.dev:

Modal · AlertDialog · Popover · HoverCard · Tooltip · DropdownMenu · ContextMenu · Toast

License

Made with 💚

Published under Apache 2.0 License.

Related Packages

floating-ui

Easy Tooltips, dropdowns, menus & popovers using floating-ui

165,538
floating-vue

Easy Vue tooltips, dropdowns, menus & popovers using floating-ui

22,794,985 3,459
vue-js-popover

Vue.js 2+ popover component

243,894 459
@novu/floating-vue

Easy Vue tooltips, dropdowns, menus & popovers using floating-ui

75,451 3,460
floating-vue2

Tooltips, dropdowns and popovers using floating-ui

1,672 0

Version History

Version Released Vue License
1.3.1 ^3.x Apache-2.0
1.3.0 ^3.x Apache-2.0
1.2.0 ^3.x Apache-2.0
1.1.3 ^3.x Apache-2.0
1.1.2 ^3.x Apache-2.0