Documentation
API
getNextAdminProps()

getNextAdminProps function

This is the documentation for the latest version of Next Admin. If you are using an older version (<5.0.0), please refer to the documentation

The following is used only for App router.

getNextAdminProps is a function that returns the props for the NextAdmin component. It accepts one argument which is an object with the following properties:

NameDescription
params The array of route params retrieved from the optional catch-all segment (opens in a new tab)
searchParams The query params retrieved from the page (opens in a new tab)
basePathThe base path of your admin. It is used to build the admin URL. It is mandatory.
apiBasePathThe base path of your admin API. It is used to build the admin API URL. It is mandatory.
schemaThe JSON schema generated by the prisma generate command.
prismaYour Prisma client instance.
getMessagesA function with no parameters that returns translation messages. It is used to translate the default messages of the library. See i18n for more details.
localeThe locale used, find from params (e.g. en, fr).
optionsThe options object - optional.