EnterUI
DocsComponentsThemesExamplesDonation
Get Started
      • Meter
      • Gauge
      • Sparkline

Default usage

  1. EnterUI
  2. /Docs
  3. /Data and Analytics
  4. /Metrics and Charts
  5. /Scalar Metrics
  6. /Sparkline
Updated 9 October 2026

Sparkline

Tiny inline trend chart rendered as plain SVG, supporting line, area, and bar variants.

Sparkline renders a compact trend visualisation suitable for dashboard tiles and table rows. Line, area, and bar variants use the shared chart blue by default. It uses native SVG without any chart dependency and stays accessible through an explicit label.

#Default usage

Line sparkline

Default variant draws a smooth trend line.

Code
<Sparkline data={[4, 8, 6, 12, 9, 14, 11]} label="Deployments per day" />

#Import

Code
import { Sparkline } from "@froggdesign/enter-ui-react";

#Variants

Variants

line, area, and bars share the same data shape.

Semantic trend

Use tone to pair a trend with its positive or negative numeric change.

#Accessibility

Provide an aria-label or label describing the trend so screen readers announce it. When omitted, the SVG is marked aria-hidden for decorative use only.

#API

  • tone: neutral (default), success, or error.

  • data: required array of numbers.

  • variant: line (default), area, bars.

  • width / height: SVG render size in pixels (defaults 120 × 32).

  • label: accessible description; required for non-decorative sparklines.

  • Extends svg props.

#Styling

Every exported component accepts className when it renders an element. EnterUI styles use .eui-* classes and --eui-* variables mapped from FroggDesign theme tokens.

PreviousGauge
NextBarChart
On this page
  • Default usage
  • Import
  • Variants
  • Accessibility
  • API
  • Styling