Skip to main content
SparklineInteractive (Deprecated)
@coinbase/cds-web-visualization@3.4.0-beta.9
The SparklineInteractive is used to display a Sparkline that has multiple time periods
Sparkline components are deprecated. Please use LineChart instead.
Import
import { SparklineInteractive } from '@coinbase/cds-web-visualization'
SourceView source codeStorybookView StorybookFigmaView Figma (internal only)
Peer dependencies
  • framer-motion: ^10.18.0
View as Markdown

Default usage

Loading...

Fill Type

The fill will be added by default with a gradient style. You can set fillType="dotted" to get a dotted gradient fill.

Loading...

Compact

Loading...

Hide period selector

Loading...

Scaling Factor

The scaling factor is usually used when you want to show less variance in the chart. An example of this is a stable coin that doesn't change price by more than a few cents.

Loading...

With header

Loading...

Custom hover data

Loading...

Period selector placement

periodSelectorPlacement can be used to place the period selector in different positions (above or below).

Loading...

Custom styles

You can also provide custom styles, such as to remove any horizontal padding from the header.

Loading...

Is this page useful?

Coinbase Design is an open-source, adaptable system of guidelines, components, and tools that aid the best practices of user interface design for crypto products.