RateLock
Locked rate with a countdown and expiry behavior.
npx shadcn add @lopifi/rate-lockExamples
The same component, case by case. Each stage is the shipped code with the props it shows; switch to Code for the usage.
Expired and re-quoted
On expiry the new rate must be accepted. Nothing executes at a rate the user hasn’t seen.
How it behaves
What it renders, what it refuses to render, and why. The same paragraphs as the family spec, so the two can’t disagree.
A locked rate with a countdown. The countdown is a linear rule-line progress bar, matching the statement grammar, not a rounded progress pill.
On expiry: the rate refreshes, the new rate crossfades in, and the confirm action is disabled until the user acknowledges the new rate. Executing at a rate the user didn't see is the worst failure this family can have.
Warning state at 20% remaining: amber plus a text countdown, never color alone.
The accounting it encodes
The concepts this component renders, each defined once in the lexicon.
More in Swaps & FX
See also
Where this component is specified, defined and running.
Elsewhere in the system
The live section RateLock renders in, the calculators behind its figures, and the ledger payloads that feed it.
- RateLock, runningThe swaps showcase — live, with theme, density, grayscale and reduced-motion switches.
- Swaps & FXThe rule for this family: A rate is a perishable fact. It never appears without a timestamp, and it is never transacted on without a lock. Specs for 9 React components: SwapWidget, RateLine, RateLock, ConversionBreakdown and 5 more.
Components are copied into your repository and meant to be edited. Rounding policy, fiscal calendar and compliance copy differ per company.
Release notes
Get an email when Swaps & FX changes
Your copy doesn’t update itself when we fix something here.
- One email when a Swaps & FX component needs a migration
- Nothing when nothing changes
Or install it now