A component for rendering a modal dialog shown over the main content.
In this guide, you'll learn how to use the Focus Modal component.
Was this example helpful?
Usage#
import { FocusModal } from "@medusajs/ui"
1<FocusModal>2 <FocusModal.Trigger>Trigger</FocusModal.Trigger>3 <FocusModal.Content>4 <FocusModal.Header>Title</FocusModal.Header>5 <FocusModal.Body>Content</FocusModal.Body>6 </FocusModal.Content>7</FocusModal>
API Reference#
Examples#
Control Focus Modal Open State#
Was this example helpful?
Was this example helpful?
Nested Focus Modals#
A focus modal can open another focus modal. These focus modals will be stacked on top of each other. You can nest as many focus modals as you want.
Was this guide helpful?