Componentdata0.93 KB gzipZero dependencies
Checkout Summary
Cart summary with quantity steppers, tax row and checkout CTA.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add checkout-summaryOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { CheckoutSummary } from "@/components/ui/checkout-summary"; <CheckoutSummary />Source code
checkout-summary.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxcheckout-summary.tsx120 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface CheckoutSummaryItem { id: string; title: string; price: string; qty: number;} export interface CheckoutSummaryProps extends React.HTMLAttributes<HTMLElement> { items: CheckoutSummaryItem[]; subtotal?: string; tax?: string; total?: string; cta?: string;Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { CheckoutSummary } from "@/components/ui/checkout-summary"; <CheckoutSummary />| Prop | Type | Description |
|---|---|---|
| items | CheckoutSummaryItem[] | Structured list of items rendered by the component. (Default: []) |
| subtotal | string | Configures subtotal. (Default: "$0.00") |
| tax | string | Configures tax. (Default: "$0.00") |
| total | string | Configures total. (Default: "$0.00") |
| cta | string | Configures cta. (Default: "Checkout") |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |
| onQtyChange | (id: string, qty: number) => void | Callback invoked on qty change. |
| onCheckout | () => void | Callback invoked on checkout. |