NextAdminPage
NextAdminPage(
props):Promise<Element>
Defined in: packages/next/src/NextAdminPage.tsx:51
VexCMS admin page server component for Next.js.
An async server component that routes by the [[...slug]] catch-all
params, prefetches Convex data via fetchQuery, and renders the correct
view component. Does not include a layout wrapper — VexAdminLayout
in app/admin/layout.tsx owns the persistent shell.
Route mapping:
path array | View |
|---|---|
[] or undefined | DashboardView |
[collectionSlug] | CollectionListView with preloaded docs |
[collectionSlug, "new"] | CollectionEditView (empty form) |
[collectionSlug, documentId] | CollectionEditView with preloaded doc |
Parameters
Section titled “Parameters”Component props
config
Section titled “config”The resolved VexCMS configuration from vex.config.ts
params
Section titled “params”Promise<{ path?: string[]; }>
Next.js 15 async params { path?: string[] }
token?
Section titled “token?”string
Returns
Section titled “Returns”Promise<Element>
The appropriate admin view for the current URL path.
Example
Section titled “Example”import { VexAdminPage } from "@vexcms/next";import config from "../../../../vex.config";
export default function AdminPage({ params,}: { params: Promise<{ path?: string[] }>;}) { return <VexAdminPage config={config} params={params} />;}