Skip to content

FXRateCard

stable

FX rate card with bid/ask, spread, daily change, and sparkline

import { FXRateCard } from "@danagraph/design-system/finance"
Loading demo…

Props

baserequired
Type stringDefault —

Base currency (e.g. EUR)

quoterequired
Type stringDefault —

Quote currency (e.g. USD)

bidrequired
Type numberDefault —

Bid price

askrequired
Type numberDefault —

Ask price

midRate
Type numberDefault —

Mid-market rate (default: calculated from bid/ask)

change
Type numberDefault —

Daily change as decimal (e.g. 0.0035 for +0.35%)

sparkData
Type number[]Default —

Sparkline data points for trend

precision
Type numberDefault 4

Rate precision

breakpoints
Type ThresholdBreakpointsDefault —

Custom severity breakpoints for change

density
Type "default" | "compact"Default —

Display density

loading
Type booleanDefault —

Show loading skeleton

error
Type stringDefault —

Error message

onRetry
Type () => voidDefault —

Retry handler for error state

semantictypeoutcomebordersurfacespace
MobileStacks / Scroll

Rate card goes full-width. Rate and delta stack vertically on mobile.

Design Rationale

This component was designed to express:

Explore Related

Was this helpful?