Tally UI

CartTotal

Cart summary with subtotal, optional tax, and total

Import

import { CartTotal } from '@tallyui/components';

Usage

<CartTotal items={cartItems} taxRate={0.1} taxLabel="GST" />

Renders rows for subtotal and total, with an optional tax line when taxRate > 0.

Props

PropTypeDefaultDescription
itemsCartLineItem[]requiredAll cart line items
currencySymbolstring'$'Currency symbol
taxRatenumber0Tax rate as decimal (0.1 = 10%)
taxLabelstring'Tax'Label for tax line
classNamestringOverride container styles

Live demo

On this page