Alert

A component for displaying important messages.

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

You are viewing Medusa docs.
Was this example helpful?

Usage#

Code
import { Alert } from "@medusajs/ui"
Code
<Alert>Here's a message</Alert>

API Reference#

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

PropTypeDefault
variant
"error"
|"success"
|"warning"
|"info"
"info"
dismissible
boolean
false
Was this helpful?

Examples#

Success Alert#

Data updated successfully!
Was this example helpful?

Warning Alert#

Be careful!
Was this example helpful?

Error Alert#

An error occured while updating data.
Was this example helpful?

Dismissible Alert#

You are viewing Medusa docs.
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