DaimoFrame: a drop-in
React component that handles the entire deposit, withdraw, or transfer flow,
from chain selection and wallet connection through transaction signing and
status updates. It works without wallet libraries or providers.
DaimoFrame supports two layouts:
modal(default): a dimmed, full-screen overlay with a rounded sheet sized to the content. Daimo owns the presentation, including iOS safe areas.embed: an inline iframe rendered exactly where you place the component. You own the presentation: wrap it in your own modal, drawer, or page layout.
Installation
react >= 18.
Modal layout
- Create a session on your server (see Quickstart)
- Pass
sessionIdandclientSecretto<DaimoFrame layout="modal" />
sessionId and clientSecret come from the session object returned by
POST /v1/sessions.
The modal layout renders the flow in an iframe inside a fixed, dimmed overlay
and sizes itself to the content. It handles iOS safe areas for you, with no
extra CSS.
Embed layout
Uselayout="embed" to render the deposit flow inside your own UI, such as a
modal or drawer that matches the rest of your app.
- The embed fills its container’s width; its height follows the content and animates as the user moves through the flow. Content centers itself at a maximum width of 512px, so keep the container at or below that width.
- The embed never scrolls internally. If your container has a fixed height,
give it
overflow-y: auto. - You own dismissal: render your own close affordance.
onClosestill fires if the flow closes itself (for example, after a completed deposit).
Props
Tracking payment status
DaimoFrame surfaces dismissal via onClose. To act on payment progress, poll
GET /v1/sessions/{id} after the session
completes. See Step 3 of the Quickstart.
Inline React components
If you need the flow rendered as native React components (not an iframe), for example to skip the payment-method picker, use the lower-levelDaimoModal
component. It renders the same flow directly in your page and exposes richer
hooks.
DaimoModal must be wrapped in DaimoSDKProvider and requires the theme
stylesheet. Selected props:
For recipient-first stablecoin sending, use the sibling
DaimoWithdrawal component. It collects the recipient
and destination route before creating an open-amount session.
Event handlers:
onPaymentStarted, onPaymentCompleted, onOpen, onClose.