Import
Usage
app/page.tsx
Props
children
React.ReactNode
The element that opens the modal. Rendered inline as the trigger;
clicking it opens the dialog. Typically a <button>, but any element
that accepts onClick works.
flows
Flow[] — optional
The deposit methods to offer, in the order listed. Each entry adds one
method to the picker; a method appears only when it is both listed here
and available for the connected wallet, chain, and currency.
Defaults to
["swap", "bank"]. List cashapp, exchange,
or a card provider explicitly to add them. List at most one card
provider — activating both card[stripe] and card[swapped] throws
an error.
app/page.tsx
The blink flow
Adds a Deposit Crypto row to the picker. Choosing it opens
Blink’s deposit flow over your app; the user pays there, and the
destination chain’s payout token arrives in the connected wallet.
app/page.tsx
blink is
safe whatever chain a given user is on.
The deposit flow renders light or dark to match your modal. It follows
the modal surface you set with --calm-popover, so a dark override in
Styling carries into it with no extra configuration.
If your app sets a Content-Security-Policy
The deposit flow renders in an iframe, sohttps://pay.blink.cash has
to be in your frame-src allowlist. Add it to the directive you
already have rather than replacing it:
frame-src must stay there. Dropping one blocks that flow the same way
a missing entry blocks this one: the browser refuses the frame and the
deposit never starts.
Outside production the flow is served from a different origin, so
allowlist the one your environment is pointed at as well as the
production host.
The flow measures the viewport to size itself, reading the viewport
height and the bottom safe-area inset, and switching to a sheet layout
below a width threshold. Without the standard viewport meta tag a phone
reports a desktop-sized virtual viewport, so the flow measures the
wrong one and stays in the desktop layout:
SSR
<CalmOnramp> is a client component. In Next.js App Router, render
it from a parent that has "use client" at the top: