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
MapoSidebarProfileSidebar footer profile: avatar, username, logout
MapoTopbarTop navigation bar with slot for custom content
MapoLangSwitcherUI locale switcher with cookie persistence
MapoThemeToggleDark / light theme toggle button
MapoLoginSign-in form with redirect and error state
MapoLogoutButtonStandalone logout button calling useMapoAuth()
MapoSnackBarToast notification bridge to useSnackStore
MapoConfirmDialogModal confirm bridge to useConfirmStore
MapoRootComponentsWrapper that mounts SnackBar + ConfirmDialog
MapoListPaginated, filterable, sortable data table shell
MapoListHeadHeader wrapper above a list: title, actions
MapoListTabsTab bar rendered above the list
MapoListFiltersFilter panel rendered by MapoList
MapoListActionsBulk action toolbar rendered by MapoList
MapoListQuickEditModal for inline editing of a single row
MapoListTableInner table of MapoList, usable standalone
MapoDetailFull-page CRUD record editor with sticky sidebar
MapoDetailLangSwitchLanguage tab bar used inside MapoDetail
MapoMediaManagerFull media library: folders, gallery, upload
MapoMediaManagerDialogModal wrapper of the manager, used as picker
MapoMediaGalleryMedia grid with single / multi selection
MapoMediaFoldersFolder list with MIME filters and folder editing
MapoMediaBreadcrumbsBreadcrumb trail of the current folder path
MapoMediaUploaderMulti-file upload queue with per-file progress
MapoMediaEditorMedia metadata editor, permission gated
MapoMediaFileChangerReplaces the file behind an existing media
MapoMediaPreviewMIME-aware preview: image, video or file icon
MapoDropAreaStandalone drag & drop file area
MapoMenuManagerSplit-pane menu editor: tree + node form
MapoMenuTreeviewDrag & drop tree of menu nodes
MapoMenuTreeviewNodeRecursive menu node renderer with nesting
MapoMenuNodeEditorForm editor for the selected menu node

MapoMediaManagerDialog and MapoMediaPreview are additionally registered as global components, so @mapomodule/form can resolve them by name from outside UIKit.

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
  • MapoOverride System — replace any Mapo component at build time
  • 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
  • ListMapoList modes, columns, filters, tabs, bulk actions
  • DetailMapoDetail CRUD lifecycle, layout, language tabs
  • Media Manager — media library, folders, upload, picker dialog
  • Menu Manager — drag & drop menu tree, node editor, translations
  • Form EngineFieldDescriptor[], field types, validation, i18n

Released under the MIT License.