Budget variance
ProBudget against actual by line, with variance.
pnpm dlx shadcn@latest add @caliper/budget-variance| Line | Budget | Actual | Variance |
|---|---|---|---|
| Subscription revenue | $410,000 | $428,000 | +$18,000+4.4% ahead |
| Services revenue | $62,000 | $54,500 | −$7,500-12.1% short |
| Cloud hosting | $41,000 | $47,600 | +$6,600+16.1% over |
| Salaries | $252,000 | $258,400 | +$6,400+2.5% over |
| Marketing | $36,000 | $31,200 | −$4,800-13.3% under |
| Travel | $12,000 | $15,900 | +$3,900+32.5% over |
| Software | $18,500 | $18,100 | −$400-2.2% under |
| Line | Budget | Actual | Variance |
|---|---|---|---|
| Salaries | 252000 | 258400 | 6400 |
| Cloud hosting | 41000 | 47600 | 6600 |
| Marketing | 36000 | 31200 | -4800 |
| Software | 18500 | 18100 | -400 |
| Travel | 12000 | 15900 | 3900 |
| Subscription revenue | 410000 | 428000 | 18000 |
| Services revenue | 62000 | 54500 | -7500 |
When to use #
Use it for
- Finance reviews spend.
Skip it when
- There is no plan to compare to.
Installation #
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.
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.
API reference #
BudgetVariance
component
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.