Skip to main content
The ChartTooltip and ChartTooltipContent components provide themed, accessible tooltips for all chart types. They automatically adapt to the mineral palette and respect light/dark themes.

Basic usage

This renders a tooltip with the label and value when hovering over a data point. The tooltip uses --card for the background and --border for the border, adapting to the active theme.

With chart config

The tooltip reads labels and colors from the chartConfig passed to ChartContainer:
The tooltip automatically shows a colored dot next to each series label, matching the chart colors.

Custom formatting

Value formatter

Format tooltip values (e.g., currency, percentages):

Label formatter

Customize the tooltip header label:

Tooltip with indicator

Show a color indicator (dot, line, or dashed) next to each value:

Hide label

For single-series charts where the label is redundant:

Cursor styling

Customize the hover cursor (the line or area that follows the mouse):
For line and area charts:

Styling guidelines

  • Use the default ChartTooltipContent for consistency across the ecosystem
  • Include tooltips on all charts — they are the primary way users read exact values
  • Use value formatters for currency, percentages, and large numbers
  • The tooltip automatically handles light/dark themes via CSS custom properties
  • Keep custom formatting minimal — the default styling is designed to be consistent