Loading component…
Loading component…
Build a billing phase – start date, duration, products with repeats and timing, discount, minimum and live totals
To reuse this local React demo, copy all files from the Code tab into the same folder, then import BillingSchedule from ./billing-schedule.
import { BillingSchedule } from "@/components/ui/billing-schedule";
export function NewContract() {
return (
<BillingSchedule
phase="Build-out phase"
defaultStart="2026-01-01"
onChange={(schedule) => save(schedule)}
/>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| title | string | "Create a billing schedule" | Heading on the tray |
| phase | string | "Build-out phase" | Starting phase name – editable in the summary |
| currency | string | "$" | Currency symbol for prices and totals |
| catalog | CatalogItem[] | Products under Add product – { name, repeat, price } | |
| defaultLines | ScheduleLine[] | Lines to start with – products, a discount or a minimum | |
| defaultStart | string | "2026-01-01" | Start date as yyyy-mm-dd |
| onChange | (schedule) => void | Called with { phase, start, duration, lines } after every change | |
| className | string | Extra class on the root |
Fills its container up to 560px; on narrow screens the fields stack and the Repeats column hides
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"