--- title: 'How to Create an Admin Widget' description: 'Learn about what Admin widgets are and how you can create your own.' addHowToData: true badge: variant: orange text: beta --- In this document, you will learn about what Admin widgets are and how you can create your own. ## Overview Admin Widgets are custom React components that developers create to be injected into predetermined injection zones across the Medusa Admin dashboard. Widgets allow you to customize the admin dashboard by providing merchants with new features. For example, you can add a widget on the order details page that shows payment details retrieved from Stripe. This guide explains the available injection zones and how to create an admin widget. --- ## Injection Zones Injection zones are areas in the admin that you can add widgets into. Widgets can only be added into these areas. There are different types of injection zones, and the type affects where the Widget is injected. For the different domains such as `product`, `order`, and `customer` there are `list` and `details` zones. Below is a full list of injection zones: :::note You can learn more about the additional props in the Props section. :::
| Injection Zone Name | Description | Additional Props |
|---|---|---|
| `order.list.before` | Added at the top of the orders list page | \- |
| `order.list.after` | Added at the bottom of the order list page | \- |
| `order.details.before` | Added at the top of the order details page | Type `OrderDetailsWidgetProps` imported from `@medusajs/admin` ```ts noCopy noReport { order, // Order object } ``` |
| `order.details.after` | Added at the end of the order details page | Type `OrderDetailsWidgetProps` imported from `@medusajs/admin` ```ts noCopy noReport { order, // Order object } ``` |
| `draft_order.list.before` | Added at the top of the draft orders list page | \- |
| `draft_order.list.after` | Added at the bottom of the draft orders list page | \- |
| `draft_order.details.before` | Added at the top of the draft order details page | Type `DraftOrderDetailsWidgetProps` imported from `@medusajs/admin` ```ts noCopy noReport { draftOrder, // DraftOrder object } ``` |
| `draft_order.details.after` | Added at the bottom of the draft order details page | Type `DraftOrderDetailsWidgetProps` imported from `@medusajs/admin` ```ts noCopy noReport { draftOrder, // DraftOrder object } ``` |
| `customer.list.before` | Added at the top of the customers list page | \- |
| `customer.list.after` | Added at the bottom of the customers list page | \- |
| `customer.details.before` | Added at the top of the customer details page | Type `CustomerDetailsWidgetProps` imported from `@medusajs/admin` ```ts noCopy noReport { customer, // Customer object } ``` |
| `customer.details.after` | Added at the bottom of the customer details page | Type `CustomerDetailsWidgetProps` imported from `@medusajs/admin` ```ts noCopy noReport { customer, // Customer object } ``` |
| `customer_group.list.before` | Added at the top of the customer groups list page | \- |
| `customer_group.list.after` | Added at the bottom of the customer groups list page | \- |
| `customer_group.details.before` | Added at the top of the customer group details page | Type `CustomerGroupDetailsWidgetProps` imported from `@medusajs/admin` ```ts noCopy noReport { customerGroup, // CustomerGroup object } ``` |
| `customer_group.details.after` | Added at the bottom of the customer group details page | Type `CustomerGroupDetailsWidgetProps` imported from `@medusajs/admin` ```ts noCopy noReport { customerGroup, // CustomerGroup object } ``` |
| `product.list.before` | Added at the top of the product list page | \- |
| `product.list.after` | Added at the bottom of the products list page | \- |
| `product.details.before` | Added at the top of the product details page | Type `ProductDetailsWidgetProps` imported from `@medusajs/admin` ```ts noCopy noReport { product, // Product object } ``` |
| `product.details.after` | Added at the bottom of the product details page | Type `ProductDetailsWidgetProps` imported from `@medusajs/admin` ```ts noCopy noReport { product, // Product object } ``` |
| `product_collection.list.before` | Added at the top of the product collections list page | \- |
| `product_collection.list.after` | Added at the bottom of the product collections list page | \- |
| `product_collection.details.before` | Added at the top of the product collection details page | \- |
| `product_collection.details.after` | Added at the bottom of the product collections list page | \- |
| `price_list.list.before` | Added at the top of the “price list” list page | \- |
| `price_list.list.after` | Added at the bottom of the “price list” list page | \- |
| `price_list.details.before` | Added at the top of the “price list” details page | Type `PriceListDetailsWidgetProps` imported from `@medusajs/admin` ```ts noCopy noReport { priceList, // PriceList object } ``` |
| `price_list.details.after` | Added at the bottom of the “price list” details page | Type `PriceListDetailsWidgetProps` imported from `@medusajs/admin` ```ts noCopy noReport { priceList, // PriceList object } ``` |
| `discount.list.before` | Added at the top of the discounts list page | \- |
| `discount.list.after` | Added at the bottom of the discounts list page | \- |
| `discount.details.before` | Added at the top of the discounts details page | Type `DiscountDetailsWidgetProps` imported from `@medusajs/admin` ```ts noCopy noReport { discount, // Discount object } ``` |
| `discount.details.after` | Added at the bottom of the discount details page | Type `DiscountDetailsWidgetProps` imported from `@medusajs/admin` ```ts noCopy noReport { discount, // Discount object } ``` |
| `gift_card.list.before` | Added at the top of the gift cards list page | \- |
| `gift_card.list.after` | Added at the bottom of the gift cards list page | \- |
| `gift_card.details.before` | Added at the top of the gift card details page | Type `GiftCardDetailsWidgetProps` imported from `@medusajs/admin` ```ts noCopy noReport { giftCard, // Product object } ``` |
| `gift_card.details.after` | Added at the bottom of the gift card details page | Type `GiftCardDetailsWidgetProps` imported from `@medusajs/admin` ```ts noCopy noReport { giftCard, // Product object } ``` |
| `custom_gift_card.before` | Added at the top of the custom gift card page | Type `GiftCardCustomWidgetProps` imported from `@medusajs/admin` ```ts noCopy noReport { giftCard, // GiftCard object } ``` |
| `custom_gift_card.after` | Added at the bottom of the custom gift card page | Type `GiftCardCustomWidgetProps` imported from `@medusajs/admin` ```ts noCopy noReport { giftCard, // GiftCard object } ``` |
| `login.before` | Added before the login form | \- |
| `login.after` | Added after the login form | \- |