Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Account Restored Invoice Success Block for React

A full-height confirmation for a paid overdue invoice: a framed before and now pair of the same four capabilities, locked while the account was suspended and unlocked in turn now, then what was settled, with what and when the next invoice goes out.

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

Bring an account back the moment its overdue invoice clears, with this invoice paid page for React with Base UI. It fills the screen between the page's two side rails and one band with a plus mark at each end. In a centred column a check in a muted tile, the heading naming the invoice, one sentence saying how long the account was suspended and the Shine Button that opens the dashboard, the only colored control, come first. Under them a corner-marked frame holds a pair of cards: Before, with a Badge reading Suspended and four capabilities behind closed locks, and Now, capped with a heavier rule, with Active and the same four capabilities behind open ones. A row of facts closes the frame: the amount settled, what it was paid with, and the day and amount of the next invoice. It's built from Badge, Shine Button and Guides, with CSS only: each lock opens once, in turn, as the page loads. On a phone the two cards stack, Before over Now. For billing portals, account recovery and any subscription app that suspends on a failed payment.

FAQ

What stays in the page, and how do I wire it for real?

Everything: the page describes an invoice that was already paid for a fictional account, so nothing is charged, restored or sent, and it holds no state. Render it after your billing provider reports the invoice paid and your own server has lifted the suspension, and fill INVOICE, SUSPENDED, SETTLED, CARD, NEXT and NEXT_AMOUNT from the invoice and subscription records. The Open the dashboard link is a placeholder href.

How do I change what the account gets back?

Edit CAPABILITIES, a plain list of names: both cards are drawn from it, so they always show the same capabilities, closed on the left card and open on the right. A capability that your plan never locked doesn't belong here; list only what the suspension took away. Each row says "Locked" or "Unlocked" in text a screen reader reads before the name, so the locks never carry the meaning alone.

How does the unlocking work, and what does reduced motion do?

Each Now row stacks a closed lock under an open one. On load the closed lock starts visible and fades out while the open one fades in, after a delay that grows by 100 milliseconds down the list, so the four open one after another, once. It's two CSS transitions with starting: styles, with no script and no loop. With reduced motion the transitions are off and the open locks are simply there when the page appears.

Where do the days and dates come from?

The suspension length is worked out from two fixed ISO dates (SUSPENDED and AS_OF), never the visitor's clock, so the sentence reads the same on every visit. Dates are written with Intl.DateTimeFormat in UTC and kept in time elements; amounts are whole cents written with Intl.NumberFormat, each in one left-to-right span so signs and digits keep their order on a right-to-left page.

How does it look on a phone?

The two cards stack with Before first, a rule between them, and the three facts become three rows. The heading, the sentence and the dashboard button are above both, so the action is on the first screen, and nothing scrolls sideways at 320 pixels.

  • Pro

    Payment Receipt Success

    Payments and refunds

    A full-height payment confirmation split in two: what happened and what comes next on one side, an itemised receipt table with the tax worked out in cents, a copyable receipt number and a text download on the other.

  • Pro

    Invoice History Billing

    Payment and invoices

    An account's invoices: a table filtered by status (paid, due, failed) with amounts, dates and PDF links, and a retry on the failed payment. On a phone each invoice is a card.

  • Pro

    Current Plan Billing

    Plan and usage

    The account's current plan in app settings: plan, price, renewal date and card, a change-plan action, every quota's usage this period on shared hairlines, and the next invoice.

  • Pro

    Plan Upgrade Success

    Plans and limits

    An upgrade confirmation page: Free and Pro side by side in one card with the limits that changed and how much each grew, the start and renewal dates, and a quiet fall of confetti that stops with reduced motion.

  • Pro

    Credit Balance Success

    Payments and refunds

    A narrow full-height confirmation for added credit: the new balance counting up from the old one with the change beside it, and a ledger of the credit by expiry that marks the batch used first.

  • Pro

    Usage Alerts Billing

    Plan and usage

    Usage alert settings: percentage thresholds as switches with number inputs, recipients as email chips, and a choice between email and a webhook, with a save that checks them.