# @medusajs/admin-sdk

> SDK for building extension for the Medusa admin dashboard.

Latest version **2.22.7** (published 2026-11-13) · 0 weekly downloads

## Install

```sh
npm install @medusajs/admin-sdk
pnpm add @medusajs/admin-sdk
yarn add @medusajs/admin-sdk
bun add @medusajs/admin-sdk
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; popular repo.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.22.7 |
| Published | 2026-11-13 |
| First published | 2023-05-12 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 17.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 36785 |
| Author | Kasper Kristensen |
| Maintainers | sebrindom, nicolas-gorga, sradevski, olijuhl, shahednasser |

## Links

- npm: https://www.npmjs.com/package/@medusajs/admin-sdk
- Repository: https://github.com/medusajs/medusa
- Homepage: https://github.com/medusajs/medusa#readme
- Issues: https://github.com/medusajs/medusa/issues
- npm.io page: https://npm.io/package/@medusajs/admin-sdk

## Dependencies (2)

- [zod](https://npm.io/package/zod.md) 4.6.6
- [@medusajs/admin-shared](https://npm.io/package/@medusajs/admin-shared.md) 2.22.7

## Recent versions

- 2.22.7 (latest) — 2026-11-13
- 2.22.8-preview-20261118094528 (preview) — 2026-11-18
- 2.22.7-snapshot-20261113105900 (snapshot) — 2026-11-13
- 2.16.0-options-preview-20260605124754 (options-preview) — 2026-06-05
- 2.0.0-rc-20241022183311 (rc) — 2024-10-22
- 0.0.1 (canary) — 2023-05-12
- 2.22.8-preview-20261117142131 — 2026-11-17
- 2.22.7-preview-20261113113415 — 2026-11-13
- 2.22.7-preview-20261113102906 — 2026-11-13
- 2.22.7-snapshot-20261113095001 — 2026-11-13
- 2.22.7-preview-20261113085903 — 2026-11-13
- 2.22.7-preview-20261113084204 — 2026-11-13
- 2.22.7-snapshot-20261112111749 — 2026-11-12
- 2.22.7-snapshot-20261111153147 — 2026-11-11
- 2.22.6 — 2026-11-09
- … 197 more at https://npm.io/package/@medusajs/admin-sdk/versions

## README

<p align="center">
  <a href="https://www.medusajs.com">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/59018053/229103275-b5e482bb-4601-46e6-8142-244f531cebdb.svg">
    <source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
    <img alt="Medusa logo" src="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
    </picture>
  </a>
</p>
<h1 align="center">
  @medusajs/admin-sdk
</h1>

<h4 align="center">
  <a href="https://docs.medusajs.com">Documentation</a> |
  <a href="https://www.medusajs.com">Website</a>
</h4>

<p align="center">
  Building blocks for digital commerce
</p>
<p align="center">
  <a href="https://github.com/medusajs/medusa/blob/develop/LICENSE">
    <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Medusa is released under the MIT license." />
  </a>
  <a href="https://github.com/medusajs/medusa/blob/develop/CONTRIBUTING.md">
    <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" alt="PRs welcome!" />
  </a>
  <a href="https://discord.gg/xpCwq3Kfn8">
    <img src="https://img.shields.io/badge/chat-on%20discord-7289DA.svg" alt="Discord Chat" />
  </a>
  <a href="https://twitter.com/intent/follow?screen_name=medusajs">
    <img src="https://img.shields.io/twitter/follow/medusajs.svg?label=Follow%20@medusajs" alt="Follow @medusajs" />
  </a>
</p>

Admin SDK for Medusa: helpers for configuring Medusa Admin dashboard extensions such as widgets, UI routes, and layouts. Import it in the `src/admin` directory of a Medusa application or plugin to export the config of each widget or UI route.

## At a glance

| | |
|---|---|
| Package | `@medusajs/admin-sdk` |
| Type | Admin |
| Import from | `@medusajs/admin-sdk` |

## Features

- `defineWidgetConfig`: set the injection zone(s) a widget is shown in, with an optional stable `id`.
- `defineRouteConfig`: set a UI route's sidebar `label`, `icon`, `nested` position, `rank`, `translationNs`, and the RBAC `permissions` required to open it.
- `defineLayoutConfig`: declare a custom layout's `id` and `sections`.
- Types: `WidgetConfig`, `RouteConfig`, `LayoutConfig`.

## Installation

```bash
npm install @medusajs/admin-sdk
```

## Usage

```tsx title="src/admin/widgets/product-widget.tsx"
import { defineWidgetConfig } from "@medusajs/admin-sdk"
import { Container, Heading } from "@medusajs/ui"

const ProductWidget = () => {
  return (
    <Container className="divide-y p-0">
      <div className="flex items-center justify-between px-6 py-4">
        <Heading level="h2">Product Widget</Heading>
      </div>
    </Container>
  )
}

export const config = defineWidgetConfig({
  zone: "product.details",
})

export default ProductWidget
```

## Resources

- [Admin Development](https://docs.medusajs.com/learn/fundamentals/admin)
- [Admin Widgets](https://docs.medusajs.com/learn/fundamentals/admin/widgets)
- [Admin UI Routes](https://docs.medusajs.com/learn/fundamentals/admin/ui-routes)
- [Widget Injection Zones](https://docs.medusajs.com/resources/admin-widget-injection-zones)
- [Admin Components](https://docs.medusajs.com/resources/admin-components)

---
_Source: https://npm.io/package/@medusajs/admin-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
