Tally UI

ChangeDisplay

Shows the change due to the customer after a cash payment

Import

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

Usage

<ChangeDisplay tendered={50} total={42.5} />

Calculates and displays the change owed by subtracting the order total from the amount tendered. If the tendered amount is less than the total, change displays as zero.

Props

PropTypeDefaultDescription
tenderednumberrequiredAmount of cash the customer handed over
totalnumberrequiredOrder total to pay
classNamestringOverride container styles

Live demo

On this page