Budget brake (Pro)
ProIncluded in $99A budget that stops the agent: the bar hits the cap like a wall and a lock drops on.
On this page
ProThe bar fills as the run spends and turns amber near the cap; at the cap it runs into the end, a lock drops on and the run pauses.
The bar fills as the run spends and turns amber in its last fifth. When it reaches the cap it runs into the end like a wall: the fill gives a little and settles, a lock drops onto the end of the track, and the line says the run is paused with what you can do next.
Installation
Needs chatcn Pro
This command works with a Pro license, along with every Pro component.
Or start free: sign up and get three Pro components on us, with a new one every month.
Usage
import { BudgetBrake } from "@/components/ui/chatcn/pro/budget-brake"
<BudgetBrake spent={run.spent} budget={20} onRaise={raise} onStop={stop} />Examples
Levels
ProThe same budget at a third spent, close to the limit, and at the limit with the brake on.
Props
| Prop | Type | Notes |
|---|---|---|
spent / budget | number | Reaching the budget pauses |
currency | string | Default "USD" |
scope | string | Default "this run" |
onRaise / raiseLabel | () => void / string | Default label doubles the cap |
onStop | () => void | Shows End run |
Accessibility
- The title is a status that changes to Paused at the budget; the bar is a labelled
meter.
Motion
- The fill is a heavy spring; the hit is a 380 ms press; the lock drops 420 ms. Reduced motion: the bar jumps.