Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Invoice Line Item Features Block for React

An invoice drawn as a framed sheet: a header with terms, a table of six line items where the seat count is a live number input, and a subtotal, tax and total that recompute as it changes.

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

An invoice feature section for React with Base UI, shown for Tallyline, a usage-billing tool. A header says why invoices matter, then a framed sheet with + marks on its corners holds the invoice: its number with a Draft badge, who it is billed to, the terms and the period, then a table of six line items with a description and the way it was counted, a quantity, a rate and an amount. The seat row's quantity is a number input: type or step it and the row, the subtotal, the sales tax and the total due all recompute, with the total rolling to its new value. Amounts are whole cents, so the lines always add up to the total. On a phone the quantity and rate columns fold into each row's description and the seat stepper sits under its name. It's built from Table, Number Input, Sliding Number, Data List, Badge and Guides, with your theme's tokens for every colour. For billing, usage-pricing and finance products, and any page where a total must be shown to be right.

FAQ

How do I change the line items?

Edit LINES at the top of the file: each has a name, a note on how it is counted, a quantity and a rate in cents (negative for a credit). TAX is the sales tax in percent. The amounts, the subtotal, the tax and the total are all worked out from these in whole cents, so no figure is typed by hand and a rounding difference can't appear.

How does the seat count work?

The seat row has a number input: type a count or use the steppers, from 1 to 500. A value that isn't a number is treated as 12, the starting count. A polite status line announces the new count and the new total for screen readers. Only the seat row is editable; the other quantities come from usage and are plain text.

How is the table built for assistive technology?

It's a real table named "Invoice TL-0421 line items", with column headers and a caption under it that says how amounts are billed. The totals sit in a description list under the table, each with its label.

Do the figures work right to left?

Yes. Each amount, rate and quantity is wrapped in a bdi element, and the total due is set left to right as one unit with its dollar sign, so a right-to-left layout keeps every number in reading order instead of moving a sign or a unit to the wrong side.

What moves, and what happens with reduced motion?

The header fades up once when the page loads, and the total's digits roll to a new value when the seats change. Both are CSS: with reduced motion the fade is off and the digits switch at once.

How does it fit on a phone?

The table drops to two columns: the quantity and rate columns hide, and each row says "820 × $0.10" under its name instead. The seat stepper moves under the name of its row so it stays within reach. Nothing scrolls sideways at 320 pixels.

  • Pro

    Four specimen cards in a two by two of framed cells: each with a mono code, a verdict badge, a small drawing plate of its measurements and a data list of three readings.

  • Pro

    Leaderboard Podium Features

    Metrics and charts

    A leaderboard: a podium of the top three at different heights in foreground tones, set on the rule of a ranked table of eight with trend arrows, and a segmented control that ranks by adoption or by speed.

  • Pro

    An eight-row comparison of a project suite with an unnamed typical tool, with real values, a monochrome check or dash, a count of where it leads and a Switch that shows only the rows that differ.

  • Pro

    Comparison Table Pricing

    Comparison tables

    Four plans compared feature by feature in one table whose hairlines meet the page rails, with a billing switch, a tinted popular column and, on a phone, a plan switch that keeps the feature column beside one plan.

  • 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

    Three route cards for a migration tool, each shaped like a perforated ticket: a manual-to-automated route on the main panel and the time saved on a stub, with a notch at each end of the divider.