Medusa Admin Components, Hooks, and Utilities
In this section of the documentation, you'll find the components, hooks, layouts, and utilities that the @medusajs/dashboard package exports, and how to use them in your admin extensions.
Use these exports to build widgets and UI routes that follow the same design conventions as the Medusa Admin, without re-implementing its components.
@medusajs/dashboard package exports these components, hooks, and utilities since Medusa v2.21.0. Before that version, you had to build the components yourself, as shown in the archived guides.The package has the following subpaths:
@medusajs/dashboard/components: React components, such asActionMenuandDataTable.@medusajs/dashboard/hooks: React hooks, such asuseProductsanduseComboboxData.@medusajs/dashboard/lib: Utilities, such asgetStylizedAmountanddefineSearchEntity.
Components#
These components allow you to use the Medusa Admin's components in your custom UI routes and widgets.
Layouts#
These layout components allow you to set the layout of your UI routes similar to the layouts used in the Medusa Admin.
Hooks#
These hooks allow you to fetch and mutate Medusa resources, and to build admin UI with the same behavior as the Medusa Admin.
Utilities#
These utilities allow you to format data, validate forms, and register custom table and search behavior.
Custom Component Guides#
These guides show how to build components and pages that the @medusajs/dashboard package doesn't export an equivalent for.
Archive#
These guides show how to build components that Medusa now exports. They're kept for reference only. Refer to the archive for the exported component that replaces each guide.