Button

A component for rendering buttons using Medusa's design system.

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

Was this example helpful?

Usage#

Code
import { Button } from "@medusajs/ui"
Code
<Button>Button</Button>

API Reference#

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

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

Examples#

Button Variants#

Was this example helpful?

Button Sizes#

Was this example helpful?

Button Loading State#

Was this example helpful?

Button with Icon#

Was this example helpful?
Was this guide helpful?
Ask Anything
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