nuxt-x-app
nuxt-x-app
Core admin dashboard layer for Nuxt 4. Provides 149 components across 28 UI categories (activity logs, avatar, billing, bulk actions, buttons, cards, charts, command palette, data display, CRUD tables, kanban, modals, slideovers, notifications, and more) plus 15 auto-imported composables for CRUD, fetching, file uploads, toasts, notifications, and navigation. Built on Nuxt UI v4.
All components are auto-imported from app/components/X/A/ with the XA prefix.
What the consumer writes
The layer ships with batteries included: components, composables, the app shell, and styling are all wired up by the layer itself. The minimal consumer is an extends entry plus optional config.
Requirements: nuxt ^4.0.3 and @nuxt/ui ^4.9.0 (@nuxt/ui is installed automatically as a dependency of the layer). When developing the layer locally, use pnpm — the repo carries a pnpm-lock.yaml.
npm install @xenterprises/nuxt-x-app
// nuxt.config.ts
export default defineNuxtConfig({
extends: ["@xenterprises/nuxt-x-app"],
})
Optional dashboard navigation and header configuration goes in the consumer's app/app.config.ts under the xDashboard namespace — the file must live in app/, not the project root, or the overrides are silently ignored:
// app/app.config.ts
export default defineAppConfig({
xDashboard: {
navigation: {
mode: "sidebar",
sidebar: {
collapsible: true,
brand: { title: "My App", logo: "/logo.svg" },
items: [
{ label: "Dashboard", icon: "i-lucide-layout-dashboard", to: "/" },
{ label: "Users", icon: "i-lucide-users", to: "/users" },
],
},
},
header: {
search: { enabled: true, shortcut: "meta+k" },
},
},
})
Optional runtime values (base API URL, PDF license) are set via environment variables — see Environment Variables below and the Configuration page. No config is required to get started: every default is opt-out.
What the layer provides
Components by category (auto-imported, XA prefix)
| Category | Count | Description |
|---|---|---|
| Activity | 1 | Chronological activity log feeds |
| Avatar | 3 | Avatar, group, and upload variants for user profiles |
| Billing | 6 | Stripe-powered pricing pages and payment management |
| Bulk Action | 4 | Batch operation toolbar for selected table rows |
| Buttons | 11 | Action buttons for common dashboard operations |
| Card | 24 | Stats, KPIs, progress, quota, revenue, and chart containers |
| Chart | 9 | Line, area, bar, donut, bubble, Gantt, and progress charts |
| Command | 1 | Keyboard-driven command palette with fuzzy search |
| Data | 7 | Numbers, key-value pairs, status badges, timelines, skeletons |
| Detail | 1 | Read-only detail panels with automatic type formatting |
| Document | 7 | File upload, list, preview, and management components |
| 1 | Rich email composer with autocomplete and attachments | |
| Fmt | 9 | Display formatters for dates, currency, phone, addresses |
| Forms | 6 | File uploads, rich editors, and search inputs |
| Inline | 4 | In-place field editing with optimistic updates |
| Kanban | 3 | Drag-and-drop kanban board with configurable columns |
| Layout | 13 | App shell with sidebar, header, breadcrumbs, and navigation |
| Modal | 3 | General-purpose modals, confirmation dialogs, data viewers |
| Note | 4 | User notes with composition, filtering, and attachments |
| Notification | 2 | Bell icon with unread badge and slide-over notification panel |
| Permission | 1 | Renderless gate for role-based conditional rendering |
| Settings | 2 | Toggle preference rows and security feature items |
| Slide | 2 | Off-canvas slideover panels from any screen edge |
| State | 3 | Standardized empty, error, and loading state components |
| Table | 10 | Data tables with built-in CRUD, filtering, sorting, pagination |
| User | 5 | User cards, list items, dropdown menus, and role badges |
| Wall | 6 | Social feed with posts, reactions, threaded replies, and tags |
| Workflow | 1 | Multi-step approval workflows with sequential and parallel modes |
All components
Every component, grouped by category with links to its doc page.
| Component | Category | Description |
|---|---|---|
| XAActivityLog | Activity | Chronological feed of activity events with user avatars and timestamps |
| XAAvatar | Avatar | User avatar with image, initials fallback, and optional status indicator |
| XAAvatarGroup | Avatar | Stacked overlapping avatar group |
| XAAvatarUpload | Avatar | Avatar component with file upload capability |
| XABillingHistory | Billing | Paginated payment and invoice history table |
| XABillingPaymentMethodCard | Billing | Saved payment method display (card brand, last 4, expiry) |
| XABillingPricingCard | Billing | Single pricing tier card with features list and CTA |
| XABillingPricingGrid | Billing | Multi-tier pricing comparison grid |
| XABillingQuoteBuilder | Billing | Interactive quote builder for custom pricing |
| XABillingSubscriptionCard | Billing | Current subscription status with upgrade/cancel controls |
| XABtnBack | Buttons | Navigate-back icon button |
| XABtnConfirmDelete | Buttons | Delete button with built-in confirmation dialog |
| XABtnCopy | Buttons | Copy-to-clipboard button |
| XABtnDropdown | Buttons | Dropdown actions menu button |
| XABtnEdit | Buttons | Edit action button |
| XABtnExport | Buttons | Generic export action button |
| XABtnExportIcal | Buttons | Export to iCal button |
| XABtnQuickActions | Buttons | Quick-actions panel button |
| XABtnRefresh | Buttons | Reload-data button with loading state |
| XABtnSubmit | Buttons | Form-submit button with loading state |
| XABtnView | Buttons | View/detail action button |
| XABulkActionAssign | Bulk Action | Assign selected rows to an option from a dropdown |
| XABulkActionDelete | Bulk Action | Delete selected rows with confirmation modal |
| XABulkActionExport | Bulk Action | Export selected rows to CSV or JSON |
| XABulkActionStatus | Bulk Action | Change the status of selected rows via a dropdown |
| XACard | Card | Base card container with header, footer, collapsible body |
| XACardActiveUsers | Card | Active user count with avatar stack and trend indicator |
| XACardChart | Card | Generic area-chart card with subtitle, comparison, and legend |
| XACardChartBlock | Card | Card overlaying a title and description on top of a chart slot |
| XACardChartExpenses | Card | Expenses card with a stacked or grouped bar chart |
| XACardChartFinance | Card | Finance breakdown card with a donut chart and percentage legend |
| XACardChartRevenue | Card | Revenue card with grouped bar chart for period comparisons |
| XACardChartRevenueLine | Card | Revenue card with line chart for current vs last-year comparisons |
| XACardChartWinLoss | Card | Win/loss card with a line chart per day |
| XACardDonut | Card | Donut chart card with a legend table below |
| XACardIndicator | Card | Minimal indicator card with label, value, and MoM trend |
| XACardKpi | Card | Slot-based KPI card with label, value, trend, and chart slots |
| XACardKpiSimple | Card | Compact KPI with currency formatting, trend, and budget progress |
| XACardProgress | Card | Progress card with bar and/or donut visualization |
| XACardProgressCircle | Card | Compact card with circular progress + label/value |
| XACardQuota | Card | Multi-quota card with usage bars and threshold states |
| XACardQuotaBar | Card | Single-resource quota card with progress bar |
| XACardRevenue | Card | Revenue metric card with embedded area sparkline |
| XACardRevenueBar | Card | Revenue card with embedded grouped bar chart |
| XACardSparkline | Card | Stat card with an inline sparkline (line or area chart) |
| XACardStat | Card | Single-metric stat card with value, trend, icon, and color |
| XACardStatsCard | Card | Stats card with value formatting, trend, icon, and color theming |
| XACardStatsGrid | Card | Responsive grid that renders an array of stat items |
| XACardStatsSummary | Card | Summary card with an area chart and comparison value |
| XAChartArea | Chart | Area chart with configurable curve, axes, legend, and grid lines |
| XAChartBar | Chart | Bar chart with stacking, orientation, radius, and padding control |
| XAChartBubble | Chart | Bubble chart with x/y/size accessors and domain-line control |
| XAChartCategoryDistribution | Chart | Horizontal bar breakdown of categories with percentages |
| XAChartDonut | Chart | Donut/pie chart with arc-width, pad-angle, center slot, legend |
| XAChartGantt | Chart | Gantt chart with row labels and x-start/length accessors |
| XAChartLine | Chart | Line chart with configurable curve, axes, legend, and grid lines |
| XAChartProgressCircle | Chart | SVG circular progress indicator with optional center label |
| XAChartStatusTracker | Chart | Uptime-style status tracker bar for service health dashboards |
| XACommandPalette | Command | Keyboard-driven command palette with grouped results and fuzzy search |
| XADataKeyValue | Data | Single key-value row with automatic type rendering |
| XADataKeyValueList | Data | List container rendering key-value items via XADataKeyValue |
| XADataNumber | Data | Inline number formatted via Intl.NumberFormat with sign, prefix, suffix |
| XADataSkeleton | Data | Animated loading placeholder in text, circular, rectangular variants |
| XADataStatusBadge | Data | Badge that auto-maps common status strings to semantic colors |
| XADataTimeline | Data | Vertical timeline with icon/dot markers and per-item slots |
| XADataTimelineFeed | Data | Activity feed timeline with date grouping, load-more, and empty state |
| XADetailPanel | Detail | Read-only detail panel with field-driven rendering |
| XADocument | Document | Core document manager combining uploader, grid/list, preview |
| XADocumentGrid | Document | Card grid display of documents with thumbnail previews |
| XADocumentItem | Document | Single document card with thumbnail, metadata, hover actions |
| XADocumentList | Document | Table-based document listing with selectable rows |
| XADocumentManager | Document | Full-featured document manager card |
| XADocumentPreview | Document | Modal for previewing images, PDFs, videos, and audio |
| XADocumentUploader | Document | Drag-and-drop file upload zone with validation |
| XAEmailComposer | Rich email composer with grouped recipient autocomplete and attachments | |
| XAFmtAddress | Fmt | Postal address in block or inline format with optional map link |
| XAFmtCurrency | Fmt | Localized currency string with optional color coding |
| XAFmtData | Fmt | Plain object or field array as a labeled key-value list |
| XAFmtDateTime | Fmt | Date/time formatted with short, long, full, or relative modes |
| XAFmtFileSize | Fmt | Byte counts to human-readable file size strings |
| XAFmtMap | Fmt | Google Maps iframe by address, coordinates, or search query |
| XAFmtPercent | Fmt | Percentage with color coding, sign, trend arrow, and thresholds |
| XAFmtPhone | Fmt | Phone numbers in multiple styles with optional tel: link |
| XAFmtRelativeTime | Fmt | Date as relative time ("2 hours ago") via NuxtTime |
| XAFormEditor | Forms | Rich text editor (Tiptap-based) |
| XAFormSearchInput | Forms | Debounced search input with loading indicator |
| XAFormSection | Forms | Groups related form fields with title and description |
| XAFormUploadAvatar | Forms | Circular avatar upload with crop preview |
| XAFormUploadFile | Forms | Multi-file upload with progress tracking |
| XAFormUploadImage | Forms | Drag-and-drop image upload with preview |
| XAInlineDate | Inline | Click-to-edit date picker saving via useXCrud |
| XAInlineEdit | Inline | Click-to-edit text/number field saving via useXCrud |
| XAInlineSelect | Inline | Click-to-select dropdown saving via useXCrud |
| XAInlineToggle | Inline | Toggle switch persisting via useXCrud |
| XAKanban | Kanban | Full kanban board with drag-and-drop and responsive mobile view |
| XAKanbanCard | Kanban | Draggable kanban card showing title, assignee, due date, tags |
| XAKanbanColumn | Kanban | Individual kanban column with count badge and drag-over highlight |
| XALayout | Layout | Top-level app shell with sidebar, header, and main content |
| XALayoutBreadcrumbs | Layout | Auto-generates breadcrumbs from route or manual items |
| XALayoutContentNav | Layout | In-page secondary sidebar for sub-navigation |
| XALayoutHeader | Layout | Sticky top header with mobile menu, breadcrumbs, search, actions |
| XALayoutMobileSidebar | Layout | Slide-over sidebar for mobile viewports |
| XALayoutPageHeader | Layout | Page title block with back button, breadcrumbs, description, tabs |
| XALayoutResponsiveNav | Layout | Horizontal nav on desktop, dropdown on mobile |
| XALayoutSecondaryNav | Layout | Horizontal sub-nav bar with optional back button and actions slot |
| XALayoutSidebar | Layout | Collapsible desktop sidebar with brand, nav, footer, user menu |
| XALayoutSidebarNav | Layout | Sidebar navigation list with section headers and dividers |
| XALayoutSidebarNavItem | Layout | Sidebar nav item with links, actions, badges, children, tooltips |
| XALayoutSidebarUserMenu | Layout | Sidebar-embedded user avatar dropdown with theme switcher |
| XALayoutUserMenu | Layout | Header user dropdown with avatar, name, email, theme switcher |
| XAModal | Modal | General-purpose modal with header, body, footer, optional trigger |
| XAModalConfirm | Modal | Confirmation dialog with danger/warning/info variants |
| XAModalKeyValue | Modal | Modal displaying an object or array of key-value pairs |
| XANote | Note | Single note card showing avatar, timestamp, body, attachments |
| XANoteFeed | Note | Animated list of notes with search, filter, load-more, empty states |
| XANoteInput | Note | Note composition form with auto-growing textarea and attachments |
| XANoteToolbar | Note | Search and filter bar for note feeds |
| XANotificationBell | Notification | Button with unread count badge that toggles the slide-over |
| XANotificationSlideover | Notification | Slide-over panel listing notifications with read/dismiss controls |
| XAPermissionGate | Permission | Renderless gate component for role-based conditional rendering |
| XASettingsPreference | Settings | Labeled toggle row for boolean user preferences |
| XASettingsSecurityItem | Settings | Security feature row with icon, label, status badge, action button |
| XASlide | Slide | Full-featured slideover with header, body, footer, and trigger |
| XASlidePanel | Slide | Low-level slide panel with Teleport, four sides, backdrop |
| XAStateEmpty | State | Empty state display with icon, title, description, optional action |
| XAStateError | State | Error state with alert icon, message, and optional retry button |
| XAStateLoading | State | Multi-variant loading skeleton and spinner |
| XATable | Table | Full-featured data table with server-side pagination, filtering, sorting |
| XATableActionColumn | Table | Per-row action cell with overflow dropdown for additional actions |
| XATableActions | Table | Per-row view/edit/delete action buttons with extra-actions slot |
| XATableCellRenderer | Table | Renders cell content from a column preset (text/email/badge/date/...) |
| XATableColumnToggle | Table | Popover-based column visibility switcher with show-all and reset |
| XATableEditableCell | Table | Double-click-to-edit cell with text/number/textarea/select/boolean |
| XATableExport | Table | Dropdown button exporting table data to CSV or JSON |
| XATableFilterBar | Table | Search + typed filter dropdowns emitting filter changes |
| XATableFilterChips | Table | Animated chips for active filters with remove-X and Clear-all |
| XATableToolbar | Table | Pre-composed toolbar with search, filter chips, column toggle, export |
| XAUser | User | Convenience alias for XAUserCard — same props and slots |
| XAUserCard | User | Compact bordered card with avatar, role badge, status, actions |
| XAUserItem | User | Flat list row for users, companies, or businesses |
| XAUserMenu | User | Avatar trigger with dropdown for profile, settings, logout |
| XAUserRoleBadge | User | Smart role badge that auto-maps role strings to colors |
| XAWallFeed | Wall | Orchestrating feed rendering pinned and regular posts |
| XAWallInput | Wall | Post composer with v-model textarea, attachments, tag selector |
| XAWallPost | Wall | Individual post card with author, body, attachments, reactions, replies |
| XAWallReactions | Wall | Emoji reaction bar with toggle interactions and picker popover |
| XAWallReplies | Wall | Expandable threaded reply section with pagination |
| XAWallTags | Wall | Tag chip list with add/remove controls and dropdown suggestions |
| XAWorkflowApproval | Workflow | Multi-approver approval widget (sequential and parallel modes) |
Composables (auto-imported)
| Composable | Description |
|---|---|
useXCrud(endpoint, options?) | Chainable CRUD: .all() / .read(id) / .create() with stale-while-revalidate cache, optimistic updates, retry, and optional server-side pagination. |
useXFetch(url, options?) | Typed fetch wrapper with auth token injection, loading and error state. |
useXFileUpload(options?) | File upload with progress tracking and preview. |
useXToast() | Toast notifications: success, error, warning, info. |
useXNotifications() | Notification feed: notifications, unreadCount, markRead, markAllRead. |
useXKanban(options?) | Kanban state: columns, moveCard, addCard, removeCard. |
useDataTable(data, options?) | Table state: filtering, sorting, pagination, selection. |
useBreadcrumb() | Breadcrumb trail: items, push, pop, replace. |
useColumns(schema) | Column definitions from a schema descriptor. |
useConfirm() | Programmatic confirmation dialog: confirm(message) → Promise<boolean>. |
useCurrentUser() | Current user state with provide/inject, role checks, and optional auth fetch. |
useDateTime() | Date/time formatting utilities. |
useXInlineEdit(options?) | In-place cell editing state with save/cancel handlers. |
useXNavigation() | Dashboard navigation tree and sidebar state from xDashboard app config. |
useXTableColumns() | Column presets for XATable (avatar, badge, date, currency, actions, ...). |
Environment Variables
| Variable | Required | Description |
|---|---|---|
NUXT_PUBLIC_X_APP_API_URL | No | Base API URL exposed to the client. Accessed via useRuntimeConfig().public.x.app.apiUrl. |
NUXT_PUBLIC_X_APP_PDF_LICENSE | No | License key for PDF features. Accessed via useRuntimeConfig().public.x.app.pdfLicense. |
Minimal Usage Example
<script setup lang="ts">
const { data, loading, remove } = useXCrud<User>("users").all()
const { success } = useXToast()
async function deleteUser(id: string | number) {
await remove(id)
success("User deleted")
}
</script>
<template>
<XATable :data="data" :loading="loading" @delete="deleteUser" />
</template>
AI Context
package: "@xenterprises/nuxt-x-app"
type: nuxt-layer
version: "0.6.0"
use-when: >
Starting a new Nuxt admin dashboard or SaaS app. Extend this layer to gain
149 auto-imported XA-prefixed components, 15 auto-imported composables, and
a pre-configured app shell — replacing weeks of boilerplate with a single
layer extension.
key-composables: [useXCrud, useXFetch, useXToast, useXNotifications, useXKanban, useDataTable, useBreadcrumb, useColumns, useConfirm]
key-components: [XATable, XAKanban, XALayout, XADetailPanel, XAEmailComposer, XAWorkflowApproval]
component-count: 149
category-count: 28
auto-import-prefix: XA
