Prompt

Displays a dialog triggered by a button

Was this example helpful?

Usage#


Code
import { Prompt } from "@medusajs/ui"
Code
1<Prompt>2  <Prompt.Trigger>Trigger</Prompt.Trigger>3  <Prompt.Content>4    <Prompt.Header>5      <Prompt.Title>Title</Prompt.Title>6      <Prompt.Description>Description</Prompt.Description>7    </Prompt.Header>8    <Prompt.Footer>9      <Prompt.Cancel>Cancel</Prompt.Cancel>10      <Prompt.Action>Delete</Prompt.Action>11    </Prompt.Footer>12  </Prompt.Content>13</Prompt>

API Reference#


Prompt#

This component is based on the Radix UI Alert Dialog primitives.

PropTypeDefault
variant
"danger"
|"confirmation"
"danger"
Was this helpful?

Prompt.Header#

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

Prompt.Footer#

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

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