Badge

A component for displaying labels or indicators in a badge style.

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

Badge
Was this example helpful?

Usage#

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

API Reference#

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

PropTypeDefault
asChild
boolean
false
size
"2xsmall"
|"xsmall"
|"small"
|"base"
|"large"
"base"
rounded
"base"
|"full"
"base"
color
"green"
|"red"
|"blue"
|"orange"
|"grey"
|"purple"
"grey"
Was this helpful?

Examples#

Badge Colors#

GreyRedGreenBlueOrangePurple
Was this example helpful?

Badge Sizes#

2xsmallxsmallsmallbaselarge
Was this example helpful?

Badge Rounded Variants#

Base RoundedFull Rounded
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