Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Tax Details Billing Block for React

Billing address and tax ID in app settings: a form that checks the postal code and tax number against the country, an optional invoice note, and a live preview of the invoice header.

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

Collect what an invoice needs, with this billing address and tax ID section for React with Base UI. A hairline frame with a plus mark on each corner holds a form and a preview side by side. The form has Fields with an Input each for the legal name, address, city, state or province, postal code and tax ID, a Native Select for the country and a Textarea for an invoice note such as a PO number. The postal code and tax number are named and checked for the chosen country, so Canada asks for a postal code and a GST/HST number while the United States asks for a ZIP code and an EIN. Saving with a mistake names it beside the field and moves focus there. The preview is a small invoice header, framed with plus marks, that rewrites itself as you type. A Shine Button saves, the only colored control. It's built from Field, Input, Native Select, Textarea, Button, Shine Button and Guides, with a CSS entrance only. For billing settings, B2B checkouts and invoicing apps.

FAQ

How do I add a country or change a format?

Edit COUNTRIES. Each country has its code and name, and two shapes, postal and tax, each with the label the field takes, an example shown in the hint and the error, and the pattern a valid value matches. SAVED holds what the account starts with and ISSUER the "From" block of the preview.

Does it verify the tax ID?

It checks the shape only: a 9-digit GST/HST number followed by RT and four digits, a UK VAT number with or without GB, and so on. It can't tell whether a number is registered. To verify, look the number up on your server, with the European VIES service for EU VAT numbers or a tax provider, before you rely on it to zero-rate an invoice. The field is optional; if it's filled, it has to match.

What gets checked when I save?

The legal name, address and city must be filled, the postal code must match the country, and a tax ID, if there is one, must match too. Each problem is written under its field and tied to it for screen readers, and focus goes to the first. Changing the country clears the postal and tax errors, because what's valid has changed. Saving a clean form shows a confirmation; connect it to the call that updates the customer.

What does the preview show?

The invoice header as it will print: your company as the issuer, the number and the "Bill to" block with the name, the address, the city and region, the postal code, the country, the tax ID with its country's label and the note. Empty fields show quiet placeholders, so you see what's missing. It's plain text on a small page, not an image, so it can be read and selected.

Is the form accessible?

Every field has a visible label, the optional ones say so, and the hint under the tax ID is linked to the field. The country is a native select, so each platform's own picker opens, including the one on a phone. Autofill hints (organization, street-address, address-level2, address-level1, postal-code) let browsers fill in the text fields in one go.

How does it look on a phone?

The fields stack in one column and the preview sits under the form, so the save button comes straight after the last field. From the small breakpoint the fields pair into two columns, and from the medium one the preview moves beside the form.

  • 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

    Tax Display Pricing

    Billing switches

    Prices with their tax on show: a country picker and an incl. VAT switch re-roll each plan, which lays out the price before VAT, the VAT rate and the total, with plan tabs on phones.

  • Pro

    Invoice Preview Pricing

    Comparison tables

    Three payroll plans as itemised monthly invoices: pick a headcount and each plan's bill adds up line by line, with its total and call to action at the top of its column.

  • Pro

    Region Pricing

    Billing switches

    Infrastructure pricing by region for a container host: a grid of six regions with each one's latency and price per hour, where choosing one re-prices the call to action beside it and the three instance sizes under it.

  • Pro

    Payment Schedule Pricing

    Billing switches

    Tuition paid once or in 3, 6 or 12 installments: four chips pick the schedule and a calendar of twelve monthly cells fills with the dated payments and their amounts, over the total and the call to action.

  • Pro

    Credit Top Up Billing

    Payment and invoices

    A credit wallet: the balance and what it will be after the top-up, amount chips with a custom amount, auto-recharge with a threshold and amount, a pay button with a live total and the recent top-ups.