Preet Suthar

Billing Invoice Details

Dashboards 4

About

A slide-over sheet that shows a full invoice with line items, tax and discount breakdown, payment method, billing address, and print/download actions.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Billing Invoice Details to your project and fits it to your theme.

Code

How Billing Invoice Details is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { useState } from "react";
import { Button } from "@/components/ui/button";
import BillingInvoiceDetails from "@/components/ui/billing-invoice-details";

const invoice = {
  id: "inv_001",
  invoiceNumber: "INV-2026-0042",
  date: new Date("2026-07-01"),
  dueDate: new Date("2026-07-15"),
  amount: 129,
  currency: "USD",
  status: "paid" as const,
  description: "Pro plan — July 2026",
  lineItems: [
    {
      description: "Pro Plan (Monthly)",
      quantity: 1,
      unitPrice: 99,
      subtotal: 99,
    },
    {
      description: "Additional Seats",
      quantity: 3,
      unitPrice: 10,
      subtotal: 30,
    },
  ],
  subtotal: 129,
  tax: { amount: 12.9, rate: 0.1, label: "VAT" },
  discount: { amount: 10, code: "WELCOME10", label: "Welcome" },
  total: 131.9,
  paymentMethod: { type: "card", brand: "visa", last4: "4242" },
  billingAddress: {
    name: "Acme Inc.",
    line1: "123 Market Street",
    line2: "Suite 400",
    city: "San Francisco",
    state: "CA",
    zip: "94103",
    country: "United States",
  },
};

export default function Default() {
  const [open, setOpen] = useState(false);

  return (
    <div className="flex min-h-[300px] items-center justify-center">
      <Button onClick={() => setOpen(true)}>View invoice</Button>
      <BillingInvoiceDetails
        invoice={invoice}
        open={open}
        onOpenChange={setOpen}
        onDownload={() => {}}
        onPrint={() => {}}
      />
    </div>
  );
}

Dependencies

More by Preet Suthar

View all
  • Modern & Stunning sign in

    Modern & Stunning sign in

    1.6K
  • Shining Text

    Shining Text

    1.5K
  • Magic Text

    Magic Text

    845
  • Toolbar

    Toolbar

    818
  • Hero 2

    Hero 2

    818
  • Typewriter Text

    Typewriter Text

    768
  • AI Chat Input

    AI Chat Input

    733
  • Full Screen Signup

    Full Screen Signup

    728

More in Dashboards

View all
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.4K
  • Sidebar

    Sidebar

    227
  • SaaS Template

    SaaS Template

    2.4K
  • Financial Bento Grid

    Financial Bento Grid

    68
  • Chat template

    Chat template

    597
  • Stats Bento

    Stats Bento

    1.1K
  • Stats cards with links

    Stats cards with links

    39
  • Statistics Card 2

    Statistics Card 2

    261

Explore more

Part of HextaUI — browse the full library on 21st.dev.