caliper uidocs

Budget variance

Pro

Budget against actual by line, with variance.

Installs components/ui/budget-variance.tsxDepends on d3-shapeMotion none in component source
pnpm dlx shadcn@latest add @caliper/budget-variance
October budget varianceBehind plan by $1,200
October budget variance
LineVariance
Subscription revenue+$18,000+4.4% ahead
Services revenue−$7,500-12.1% short
Cloud hosting+$6,600+16.1% over
Salaries+$6,400+2.5% over
Marketing−$4,800-13.3% under
Travel+$3,900+32.5% over
Software−$400-2.2% under
October budget variance
LineBudgetActualVariance
Salaries2520002584006400
Cloud hosting41000476006600
Marketing3600031200-4800
Software1850018100-400
Travel12000159003900
Subscription revenue41000042800018000
Services revenue6200054500-7500

When to use #

Use it for

  • Finance reviews spend.

Skip it when

  • There is no plan to compare to.

Installation #

terminal
pnpm dlx shadcn@latest add @caliper/budget-variance

Adds its 3 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage #

Import it from your copy of the source. The example behind the preview comes with the source.

example.tsx
import { BudgetVariance } from "@/components/ui/budget-variance"

The worked example comes with Pro

The 20-line example behind the preview opens here with a Pro or Team licence.

Checking your licence…

API reference #

BudgetVariance

component
PropTypeDefault
label *string—
lines *readonly BudgetLine[]—
loadingboolean—
errorstring—
classNamestring—

Accessibility #

It exposes status semantics, with aria-label, aria-busy, aria-pressed and aria-hidden kept in step with state. Changes that matter are announced through a live region.

No custom key handling; Tab and the native activation keys do the work.

Motion #

It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.