Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Quick Transfer Dialog Block for React

A payments app's account home with its send-money dialog shown open: five recent people in a scrolling row, an amount with quick chips, a note, the fee and balance after, and a review step before Send.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Let people send money to someone they know in a few taps, with this send-money dialog for React with Base UI. It opens from the account home of Paywren, a peer-to-peer payments app: the page's header holds an outline Send money Button, and the page itself, the balance, a bar and two rows of activity, is drawn under a soft scrim inside a hairline frame with a plus mark on each corner. The Dialog starts with five recent people in a row you can scroll, each an initials disc and a name, chosen like radio buttons. Under them a large amount in a Number Input with +$10, +$25 and +$50 chips, a note Input, and the fee and the balance after. An amount over the balance is refused in words. The only Shine Button reads Review first and turns the body into a summary, "Send $40.00 to Ravi Nair", with an Avatar, then reads Send $40.00; Back returns to the amount. Sending lowers the balance behind the dialog and adds a row to its activity. For preview the dialog is drawn open in place when the page loads; the header's button opens the real dialog. For wallets, banking apps and any app that moves money between people.

FAQ

Why is the dialog already open, and what do I keep?

So you can see it without a click. On load the dialog is a copy drawn in place over the page: a native dialog element that isn't modal, so nothing is trapped, hidden or focused, and the page around the preview keeps working. The Send money button opens the real Dialog, modal, with its focus trap, Escape and focus return, and the copy stays closed until a reload. Both show the same TransferFields component and share the block's state, so an amount typed in the copy is there in the real one. In your app keep the Dialog and drop the copy: the "in-place" state, the scrim and the dialog element inside the frame.

Why a review step, and how does it work?

Money that has moved can't be called back, so Send only happens from a summary. The compose view and the review view sit in one cell, the one you aren't on invisible and inert, so the dialog keeps its height; the primary button is the same button that changes its label from Review to Send $40.00, so focus stays where your hands are. Back returns to the amount with everything kept, and what is on screen at each step is also said in the dialog's polite status.

What does the amount accept?

Whole dollars. The field and the chips add up in cents, the amount can't be zero, and one over the balance says "Not enough balance: $1,240.00 available." in the line under it, with focus on the field when you press Review. The fee is $0.00 between accounts of the app, and the balance after is worked out from the amount as you type. Prices and balances are formatted with Intl.NumberFormat in one left-to-right run, so they never reorder in a right-to-left page.

What stays local?

Everything. No money moves: Send only lowers the balance behind the dialog and adds a row, Ravi Nair: -$40.00, and says, in the polite status, that nothing was sent. The balance and the five people are typed in the file. In your app send the transfer to your server with a key that makes a retry safe, wait for its answer, and update the balance and the activity from what comes back; keep the review step.

Is it accessible from the keyboard?

Yes. The five people are one native radio group (arrow keys move between them, and Tab reaches the chosen one), named by their full names, and the row scrolls so the focused one is always in view. The real dialog is named by its title and described by its sentence, focus starts on the chosen person and stays inside until it closes, and Escape, Cancel and the close button return focus to Send money. The trigger is passed to DialogTrigger through render, and the dialog is controlled with open and onOpenChange.

How does it look on a phone?

The copy shown on load docks to the foot of the page as a bottom sheet with its buttons pinned, the people, the amount and the note scrolling above them; the row of people scrolls sideways. The real dialog keeps the Dialog's own phone layout, a sheet stuck to the bottom of the screen.

  • Pro

    Split Payment Dialog

    Payments and plans

    A point-of-sale ticket with its split-payment dialog shown open: methods added from a select, an amount for each, a running total with a bar by method, and Pay held back until the remainder is exactly zero.

  • Pro

    Payment Method Dialog

    Payments and plans

    A ticket shop's order summary with its payment-method dialog shown open: a saved card, a bank transfer and an invoice as rows, each asking only for the one detail it needs, and a Pay with row behind the dialog that changes when you choose.

  • Pro

    Recurring Payment Dialog

    Payments and plans

    A rent page with its autopay dialog shown open: an amount, how often, a start day from a folded inline calendar, when it ends, and the next four payment dates worked out under the fields.

  • Pro

    Share Receipt Dialog

    Share and invite

    A payments app's Payment sent page with a dialog shown open that keeps the receipt three honest ways: a paper receipt drawn in mono type, Copy as text, Save .txt and Print, each doing what the browser really does.

  • Pro

    Gift Card Dialog

    Payments and plans

    A café's gift cards page with its builder dialog shown open: a card drawn in greys that reads as you build it, preset or custom amounts, three printed patterns, a recipient and a message, and delivery now or on a day picked in an inline calendar.

  • Pro

    Savings Goal Dialog

    Payments and plans

    A savings app's goals list with a deposit dialog shown open: a ring that moves when you choose what goes in, the figures under it, three quick deposits or a whole number of your own, a weekly amount and the day the goal is reached at that pace.