Beautiful D3 + ReactData Visualizations

d3-ui is a modern collection of composable React components powered by D3. Build beautiful, interactive data visualizations with an easy-to-use API.

Why d3-ui?

Easy to Use

Intuitive compound component API that's familiar to React developers.

TypeScript

Fully typed components with excellent IDE support and autocomplete.

Customizable

Styled with Tailwind CSS. Customize colors, sizes, and styling easily.

Performant

Optimized rendering with smooth D3 transitions and animations.

Composable

Build complex visualizations by composing simple, reusable components.

Interactive

Built-in tooltips, legends, and smooth interactions out of the box.

Available Components

Component Examples

Explore interactive examples of all available components

Heatmap

Visualize dense data grids with color gradients. Perfect for showing matrix data patterns.

Basic Heatmap

2411132599968933299991356882281
Sales

Hidden Labels

Using variant="none"

Profit

Custom Formatting

Format cell values with labelFormatter

$43
$84
$95
$94
$39
$7
$63
$69
$39
$21
$58
$18
$4
$55
$76
$24
Loss

Large Heatmap (600x600)

Multi-dataset visualization with high-contrast colors

14305623143609858277411626595613368463389557019878575146548951375446523230126171829236773751565922182766161888647826308212455744256519290393614471325798059659183552902338911142704222387951080777322701895
Energy
Water
Waste

Line Chart

Track trends over time with smooth, responsive line charts.

Multiple Lines

Sales, profit, and loss comparison

Sales
Profit
Loss

Single Line

Revenue over 12 months

Revenue

Custom Labels

Formatted with currency symbol

$21
$164
$40
$193
$138
$71
$50
$125
$169
$68
$136
$86
Revenue

Large Chart (600x300)

Multiple lines with labels in high-resolution visualization

Sales
Profit
Loss

Area Chart

Show cumulative data and trends with stacked or overlapping areas.

Single Series

Revenue

Revenue

Two Series

Revenue and expenses

Revenue
Expenses

Three Series

Revenue, expenses, profit

Revenue
Expenses
Profit

Large Chart (600x400)

Multi-series stacked visualization

Revenue
Expenses
Profit

Bar Chart

Compare values across categories with intuitive bar visualizations.

Grouped Bars

Apples and oranges

Apples
Oranges

Single Series

Apples only

Apples

Interactive

Adjust with slider

Large Chart (600x300)

Multi-series visualization with detailed breakdown

Apples
Oranges

Pie Chart

Visualize parts of a whole with elegant pie and donut charts.

Simple Pie

Single value

100
Completed

Multi-segment

Low, medium, high

304030
Low
Medium
High

Donut Chart

Completed vs pending

Completed
Pending

Large Chart (600x300)

Donut chart with center label

304030
Low
Medium
High

Scatter Plot

Explore correlations between variables and identify patterns.

Multiple Series

Sales, profit, and loss

Sales
Profit
Loss

Single Series

Revenue distribution

106115618161111376931871651571994178
Revenue

Custom Labels

With currency formatting

$106$1$156$181$61$11$137$6$93$187$165$157$199$41$78
Revenue

Large Plot (600x300)

Multi-series visualization with high contrast

Sales
Profit
Loss

Treemap Examples

The Treemap component visualizes hierarchical data using nested rectangles. Examples show how different props and styles change its appearance.

Basic Treemap

Electronics - 1,500Clothing - 1,200Furniture - 900
Electronics
Clothing
Furniture

Nested Treemap

Shows hierarchical data with children nodes.

Men
Women

Custom Labels

Format labels with a unit or symbol.

Electronics - 1,500 USD
Clothing - 1,200 USD
Furniture - 900 USD
Electronics
Clothing
Furniture

Dark Mode Treemap

Larger treemap (600x400) for high-contrast visualization.

Shirts - 500Pants - 300Dresses - 400Shoes - 250
Men
Women

Gauge Chart Examples

The GaugeChart component visualizes values on a semi-circular gauge. Below are examples with multiple segments, dynamic needles, and dark mode.

Simple Gauge

Shows simple gauge with a needle for current value.

65
Completed

Multi-segment Gauge

Gauge with Low / Medium / High segments, demonstrating multiple ranges.

50
Low
Medium
High

Dynamic Needle

Use the slider to change the needle value dynamically.

65
Completed
Pending

Dark Mode Gauge

Large gauge (600x300) for high contrast viewing.

75
Low
Medium
High

Ready to get started?

Check out our getting started guide to learn how to install and use d3-ui in your project.

View Getting Started Guide