)
})}
{!isLast && }
)
})}
)
}
```
The `ActionMenu` component shows a three-dots icon (or `EllipsisHorizontal`) from the [Medusa Icons package](!ui!/icons/overview) in a button.
When the button is clicked, a dropdown menu is shown with the actions passed in the props.
The component accepts the following props:
void`",
optional: true,
description: "The function to execute when the action is clicked. This is required if `to` isn't provided."
}
]
}
]
}
]}
/>
---
## Example
Use the `ActionMenu` component in any widget or UI route.
For example, create the widget `src/admin/widgets/product-widget.tsx` with the following content:
```tsx title="src/admin/widgets/product-widget.tsx"
import { defineWidgetConfig } from "@medusajs/admin-sdk"
import { Pencil } from "@medusajs/icons"
import { Container } from "../components/container"
import { ActionMenu } from "../components/action-menu"
const ProductWidget = () => {
return (
,
label: "Edit",
onClick: () => {
alert("You clicked the edit action!")
},
},
],
},
]} />
)
}
export const config = defineWidgetConfig({
zone: "product.details.before",
})
export default ProductWidget
```
This widget also uses a [Container](../container/page.mdx) custom component.
### Use in Header
You can also use the action menu in the [Header](../header/page.mdx) component as part of its actions.
For example:
```tsx title="src/admin/widgets/product-widget.tsx"
import { defineWidgetConfig } from "@medusajs/admin-sdk"
import { Pencil } from "@medusajs/icons"
import { Container } from "../components/container"
import { Header } from "../components/header"
const ProductWidget = () => {
return (
,
label: "Edit",
onClick: () => {
alert("You clicked the edit action!")
},
},
],
},
],
},
},
]}
/>
)
}
export const config = defineWidgetConfig({
zone: "product.details.before",
})
export default ProductWidget
```