Skip to content
Menu

Charts

Spark line

Spark line: A row of metric tiles whose sparklines draw themselves on mount and follow the pointer with a crosshair that reads the value under it.

Using Spark line

Spark line uses the wide preview frame with a dark theme setting.

Customize the preview

These controls are passed to the demo. Defaults and limits describe the preview; consult the implementation for its full prop API.

ControlTypeDefaultPreview limits
colorcolor#38BDF8No additional limit in the metadata.
smoothbooleantrueNo additional limit in the metadata.
pointsnumber30From 12 to 60; step 1
Which frameworks are available for Spark line?

Spark line is available for React, Vue, Svelte, Astro, HTML. The live preview uses React; the source observations below apply to index.tsx. Check the selected port before relying on the same interactions.

What does Spark line depend on?

The React metadata lists these npm dependencies beyond React: motion, clsx, tailwind-merge.

What accessibility details are visible in Spark line?

The React source for Spark line includes: attributes and handlers (aria-hidden, aria-label, onKeyDown, tabIndex); explicit roles (img); key comparisons (ArrowLeft, ArrowRight, Escape). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.

How does Spark line handle reduced motion?

Spark line reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: delay: reduce ? 0 : delay; delay: reduce ? 0 : delay + 0.35; delay: reduce ? 0 : delay + 0.85. Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.

Connect your agent

Related open components