DaimoFrame: a drop-in
React component that handles the entire deposit flow — chain selection, wallet
connection, transaction signing, and status updates — inside a dimmed,
full-screen overlay.
Installation
react >= 18.
Basic usage
- 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.
DaimoFrame renders the checkout in an iframe inside a fixed, dimmed overlay and
sizes itself to the content. It handles iOS safe areas for you — no extra CSS
required.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
sessionId | string | - | Unique session ID. Sessions are created server-side. (required) |
clientSecret | string | - | Unique client secret, returned at session creation. (required) |
layout | "modal" | "modal" | Presentation layout. "modal" is the only supported value. |
onClose | () => void | - | Called when the user dismisses the checkout. |
baseUrl | string | https://daimo.com | Hosted checkout origin. Override only for staging / self-hosted. |
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 checkout rendered inline (not in an iframe overlay) — for example to embed it directly in a page layout, or to skip the payment-method picker — use the lower-levelDaimoModal component. It renders the same flow
as native React components and exposes richer hooks.
DaimoModal must be wrapped in DaimoSDKProvider and requires the theme
stylesheet. Selected props:
| Prop | Type | Default | Description |
|---|---|---|---|
sessionId | string | - | Unique session ID. (required) |
clientSecret | string | - | Unique client secret. (required) |
embedded | boolean | false | Render inline instead of as a floating modal. |
defaultOpen | boolean | true | Whether the modal starts open. |
connectToInjectedWallets | boolean | false | Skip the payment method picker; auto-connect injected wallets. |
connectToAddress | Address | - | Skip the picker; use an already-connected EVM wallet. |
returnUrl | string | - | URL to navigate to after successful payment. |
onPaymentStarted, onPaymentCompleted, onOpen, onClose.