Skip to content

UIKit

@mapomodule/uikit is the visual layer of Mapo. It provides:

  • A default admin layout (mapo-default) with sidebar, topbar, and global feedback components
  • Auto-generated sidebar navigation driven by route metadata — no manual menu config
  • Authentication UI (MapoLogin) with redirect and error handling
  • Global feedback (MapoSnackBar, MapoConfirmDialog) that any page can trigger via stores
  • Full Tailwind v4 + Nuxt UI theming with CSS overrides and Nuxt UI component defaults

What's included

ComponentAuto-importedDescription
MapoSidebarCollapsible sidebar with drawer + mini modes
MapoSidebarListRoute-driven menu list, supports footer
MapoSidebarListItemRecursive menu item with submenu support
MapoTopbarTop navigation bar with slot for custom content
MapoLoginSign-in form with redirect and error state
MapoSnackBarToast notification bridge to useSnackStore
MapoConfirmDialogModal confirm bridge to useConfirmStore
MapoRootComponentsWrapper that mounts SnackBar + ConfirmDialog

Layout registered via Nuxt layouts:

LayoutKey
mapo-defaultFull admin shell: sidebar + topbar + content area

Setup

@mapomodule/uikit is installed automatically by the mapomodule meta-package. @nuxt/ui must be declared before mapomodule in modules[] — installing it via installModule() from inside a module causes an Icon.vue SSR infinite loop due to how @nuxt/icon resolves component aliases. @iconify-json/lucide is bundled with mapomodule and does not need to be installed separately.

ts
// nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    "@nuxt/ui", // ← must come first
    "mapomodule",
  ],
});

Sections

  • Theming — CSS overrides, Tailwind tokens, Nuxt UI component defaults
  • Layoutmapo-default layout, available slots
  • Sidebar — sidebar navigation, route meta config, nesting, mini/drawer state
  • Topbar — topbar slots and customization
  • LoginMapoLogin props, slots, redirect logic
  • Feedback — snackbar and confirm dialog how-to

Released under the MIT License.