Icon Button

A component that displays an icon in a button.

In this guide, you'll learn how to use the Icon Button component.

Was this example helpful?

Usage#

Code
1import { IconButton } from "@medusajs/ui"2import { Plus } from "@medusajs/icons"
Code
1<IconButton>2  <Plus />3</IconButton>

API Reference#

This component is based on the button element and supports all of its props

PropTypeDefault
asChild
boolean
false
isLoading
boolean
false
variant
"primary"
|"transparent"
"primary"
size
"2xsmall"
|"xsmall"
|"small"
|"base"
|"large"
|"xlarge"
"base"
Was this helpful?

Examples#

Icon Button Variants#

Was this example helpful?

Icon Button Sizes#

Was this example helpful?

Icon Button Loading State#

Was this example helpful?

Disabled Icon Button#

Was this guide helpful?
Ask Anything
Ask any questions about Medusa. Get help with your development.
You can also use the Medusa MCP server in Cursor, VSCode, etc...
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break