The Daimo modal is a drop-in React component that handles the entire deposit flow: chain selection, wallet connection, transaction signing, and status updates.Documentation Index
Fetch the complete documentation index at: https://docs.daimo.com/llms.txt
Use this file to discover all available pages before exploring further.
Installation
react >= 18.
Setup
Wrap your app inDaimoSDKProvider:
Basic usage
- Create a session on your server (see Quickstart)
- Pass
sessionIdandclientSecretto<DaimoModal>
sessionId and clientSecret come from the session object returned by POST /v1/sessions.
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) |
defaultOpen | boolean | true | Whether the modal starts open |
connectToInjectedWallets | boolean | false | Skip payment method picker. Auto-connect to injected wallets. |
connectToAddress | Address | - | Skip payment method picker. Use already-connected EVM wallet at the specified address. |
embedded | boolean | false | Render inline instead of as a floating modal |
platform | string | auto | Caller’s platform. Prefer "desktop" or "mobile"; legacy "ios", "android", and "other" still work. Affects wallet and exchange UX. Auto-detected. |
returnUrl | string | - | URL to navigate to after successful payment |
returnLabel | string | - | Text shown on successful payment. Button label if returnUrl is set (default “Return to App”), otherwise text. |
Event handlers
| Handler | Fires when |
|---|---|
onPaymentStarted | User’s deposit transaction is detected |
onPaymentCompleted | Funds are delivered to the destination |
onOpen | Modal becomes visible |
onClose | Modal is dismissed |
Embedded mode
Setembedded to render the deposit flow inline instead of as an overlay modal: