Skip to content

UIKit — Component API Reference ​

Complete props, emits, slots, and exposed methods for all UIKit components.


MapoDetail ​

Full-page CRUD detail view with sidebar, language switcher, and save/delete actions.

Props ​

PropTypeDefaultDescription
endpointstring— requiredREST endpoint passed to useCrud.
idstring | number— requiredRecord ID. Pass 'new' to create.
fieldsFieldDescriptor<T>[]— requiredFields for the main body form.
sidebarFieldsFieldDescriptor<T>[][]Fields rendered in the sidebar form.
languagesstring[][]Translation language codes (e.g. ['it', 'en']).
langThresholdnumber8Show the language select next to the tabs above this many languages.
modelNamestring | nullnullHuman-readable model name shown in the page title.
sidebarColsnumber4Sidebar column span (1–11 in a 12-col grid).
stickybooleantrueKeep sidebar sticky while scrolling. Offset controlled by --mapo-topbar-height CSS variable (default 64px).
usePatchbooleantrueSend PATCH (diff only) on update instead of PUT.
readonlybooleanfalseForce read-only mode globally.
registryFieldRegistry | nullnullField registry. Falls back to $mapoFormRegistry if omitted.

Emits ​

EventPayloadDescription
savedmodel: TFired after a successful save.
deleted—Fired after successful deletion.

Slots ​

SlotDescription
titleReplaces the page title area.
body-langReplaces the language switcher tab bar.
body-topExtra content above the main form.
bodyReplaces the entire main form section.
body-bottomExtra content below the main form.
side-buttonsReplaces the entire sidebar action card.
button-saveOverrides the Save button.
button-savecontinueOverrides the Save & Continue button.
button-backOverrides the Back button.
button-deleteOverrides the Delete button.
side-topExtra content at the top of the sidebar.
side-bottomExtra content at the bottom of the sidebar.
field.{field.key}Per-field override (forwarded to the inner MapoForm).

MapoDetailLangSwitch ​

Language tab bar used inside MapoDetail. Can also be used standalone.

Props ​

PropTypeDefaultDescription
modelValuestring— requiredCurrently selected language code.
langsstring[]— requiredAvailable language codes.
errorsRecord<string, string[]>{}Validation errors keyed by field path.
noRouteChangebooleanfalseDo not update the URL query on language change.
langThresholdnumber8Show the select above this many languages.

Emits ​

EventPayloadDescription
update:modelValuelang: stringEmitted when the user selects a different language.

MapoList ​

Paginated, filterable, sortable data table with quick-edit, bulk actions, and tabs.

Props ​

PropTypeDefaultDescription
endpointstring— requiredAPI endpoint for data fetching.
columnsListColumn[]— requiredColumn definitions.
lookupstring'id'Primary key field name.
filtersFilterDescriptor[][]Available filter definitions.
actionsActionDescriptor<T>[][]Bulk action definitions.
tabsListTabItem[][]Tab definitions for list segmentation.
defaultTabstring—Default active tab value.
tabQueryParamstring'tab'URL query parameter name for the active tab.
searchablebooleantrueShow the search input.
draggablebooleanfalseEnable drag-and-drop row reordering.
positionFieldstring'position'Model field updated on drag reorder.
editFieldsFieldDescriptor<T>[][]Fields shown in the quick-edit modal.
languagesstring[]—Language codes for quick-edit i18n.
registryPartial<FieldRegistry>—Field registry for quick-edit.
detailBasestring—Base path for the per-row detail link (e.g. '/news' → /news/42).
defaultPageSizenumber | "all"20Initial page size.
pageSizeOptions(number | "all")[][10, 20, 50, 100]Per-page options; "all" shows every row.

Slots ​

SlotDescription
headHeader area above the table.
dtable.toolbarToolbar content inside the table header.
dtable.emptyCustom empty-state content.
dtable.loadingCustom loading-state content.
`cell.${column.key}`Per-column cell override. Receives { item, value }. Use #[\cell.key`]` syntax in templates.
filter.{filter.value}Per-filter custom panel. Receives { filter, toggleChoice, removeFilter }.
qedit.extraExtra content inside the quick-edit modal. Receives { model }.

Exposed Methods ​

MethodDescription
refresh()Refresh the table data.

MapoListTable ​

Inner table component used by MapoList. Useful if you need the table alone without filters/tabs/actions.

Props ​

PropTypeDefaultDescription
endpointstring— requiredAPI endpoint.
columnsListColumn[]— requiredColumn definitions.
lookupstring'id'Primary key field name.
searchablebooleantrueShow the search input.
draggablebooleanfalseEnable drag-and-drop reordering.
positionFieldstring'position'Field updated on drag reorder.
editFieldsFieldDescriptor<T>[][]Quick-edit form fields.
languagesstring[]—Language codes for quick-edit.
registryPartial<FieldRegistry>—Field registry for quick-edit.
detailBasestring—Base path for row detail links.
defaultPageSizenumber | "all"20Initial page size.
pageSizeOptions(number | "all")[][10, 20, 50, 100]Per-page options; "all" shows every row.

Emits ​

EventPayloadDescription
update:selectionT[] | "all"Current row selection changed.
update:selectionQueryURLSearchParamsQuery params for the current selection changed.

Slots ​

SlotDescription
dtable.toolbarToolbar content.
dtable.emptyEmpty-state content.
dtable.loadingLoading-state content.
`cell.${column.key}`Per-column cell override. Receives { item, value }. Use #[\cell.key`]` syntax in templates.

Exposed Methods ​

MethodDescription
refresh()Reload table data.

MapoListFilters ​

Filter sidebar rendered by MapoList. Can also be used standalone.

Props ​

PropTypeDefaultDescription
filtersFilterDescriptor[]— requiredAvailable filter definitions.
modelValueActiveFilter[]— requiredCurrently active filters.
disabledboolean—Disable all filter controls.

Emits ​

EventPayloadDescription
update:modelValueActiveFilter[]Emitted when the active filter set changes.

Slots ​

SlotDescription
filter.{filter.value}Custom panel for a specific filter. Receives { filter, toggleChoice, removeFilter }.

MapoListActions ​

Bulk action toolbar rendered by MapoList.

Props ​

PropTypeDefaultDescription
actionsActionDescriptor<T>[][]Custom action definitions.
selectionT[] | "all"— requiredCurrently selected items (or "all").
selectionQueryURLSearchParams— requiredQuery params representing the selection.
endpointstring— requiredAPI endpoint for bulk operations.
lookupstring'id'Primary key field name.

Emits ​

EventPayloadDescription
actionCompleted—Fired when a bulk action finishes.

Slots ​

SlotDescription
prependContent before the action selector.
appendContent after the Apply button.

MapoListTabs ​

Tab bar rendered above MapoList.

Props ​

PropTypeDefaultDescription
tabsListTabItem[]— requiredTab definitions.
modelValuestring—Active tab value.

Emits ​

EventPayloadDescription
update:modelValuestringEmitted when the user switches tab.

Slots ​

SlotDescription
tabCustom tab button. Receives { tab: ListTabItem, active: boolean }.

MapoListQuickEdit ​

Modal for inline editing of a single list row.

Props ​

PropTypeDefaultDescription
openboolean— requiredControls modal visibility.
endpointstring— requiredAPI endpoint.
itemIdstring | number | nullnullID of the record to edit.
editFieldsFieldDescriptor<T>[][]Form fields.
lookupstring'id'Primary key field name.
languagesstring[]—Language codes for i18n fields.
registryPartial<FieldRegistry>—Field registry.

Emits ​

EventPayloadDescription
update:openbooleanEmitted when the modal should open or close.
saveditem: TEmitted after a successful save.

Slots ​

SlotDescription
extraAdditional content in the form. Receives { model: T }.

MapoSidebar ​

Main sidebar shell. Wraps MapoSidebarList and exposes logo / footer slots.

Props ​

None.

Slots ​

SlotDescription
logoLogo area at the top of the sidebar.
nav-topNavigation items rendered above the main list.
nav-bottomNavigation items rendered below the main list.
footerFooter area at the bottom of the sidebar.

MapoSidebarList ​

Auto-built navigation list from route meta. Rendered by MapoSidebar.

Props ​

PropTypeDefaultDescription
footerbooleanfalseWhen true, renders only items with meta.sidebarFooter.
minibooleanfalseMini (icon-only) sidebar mode.

MapoSidebarListItem ​

Recursive navigation item. Renders children as a nested group.

Props ​

PropTypeDefaultDescription
nodeMenuNode— requiredNavigation node with label, icon, route, and optional children.
minibooleanfalseMini (icon-only) mode.

MapoTopbar ​

Top application bar.

Props ​

None.

Slots ​

SlotDescription
leftLeft area (e.g. hamburger menu).
defaultCenter content.
rightRight area (e.g. user menu).

MapoLogin ​

Login page component. Handles credential submission via useMapoAuth.

Props ​

None.

Slots ​

SlotDescription
brandBrand/logo area above the form card.
panelLeft decorative panel (visible on wide screens).
footerFooter content below the form card.

MapoSnackBar ​

Global toast notification bar. Driven by useSnackStore. Mount once in your layout via MapoRootComponents.

Props / Emits / Slots ​

None — state is fully managed by useSnackStore.


MapoConfirmDialog ​

Global confirmation dialog. Driven by useConfirmStore. Mount once via MapoRootComponents.

Props / Emits / Slots ​

None — state is fully managed by useConfirmStore.


MapoRootComponents ​

Convenience wrapper that mounts MapoSnackBar and MapoConfirmDialog in one place.

Props / Emits / Slots ​

None.


MapoThemeToggle ​

Dark / light theme toggle button (pending design decision — UI only, no persistence yet).

Props / Emits / Slots ​

None.


MapoLogoutButton ​

Standalone logout button that calls useMapoAuth().logout(). Drop it anywhere in the layout.

Props ​

PropTypeDefaultDescription
variant'solid' | 'outline' | 'soft' | 'ghost' | 'link''ghost'Nuxt UI button variant.
colorstring'neutral'Nuxt UI button color.
size'xs' | 'sm' | 'md' | 'lg' | 'xl''sm'Nuxt UI button size.
iconOnlybooleanfalseRender only the icon, no label text.

Slots ​

SlotDescription
defaultLabel text. Default: Logout. Ignored when iconOnly.

MapoSidebarProfile ​

User profile row for the sidebar footer. Shows avatar, username, and a logout button. In mini mode shows only the avatar with a tooltip.

Props ​

PropTypeDefaultDescription
minibooleanfalseCompact (icon-only) mode, used when the sidebar is collapsed.

Props / Emits / Slots ​

No emits or slots — reads from useAuthStore and calls useMapoAuth().logout() directly.


Layouts ​

mapo-default ​

Main admin layout. Composes MapoSidebar, MapoTopbar, <slot />, and MapoRootComponents.

SlotDescription
defaultMain page content.
sidebar:logoForwarded to MapoSidebar#logo.
sidebar:nav-topForwarded to MapoSidebar#nav-top.
sidebar:nav-bottomForwarded to MapoSidebar#nav-bottom.
sidebar:footerForwarded to MapoSidebar#footer.
topbar:leftForwarded to MapoTopbar#left.
topbarForwarded to MapoTopbar#default.
topbar:rightForwarded to MapoTopbar#right.

mapo-empty ​

Bare-bones layout with no chrome. Useful for login pages and error pages.

Released under the MIT License.