๐ŸŽฏ Nexus teaches Next.js from foundations to professional systemsโ€ขโšก App Router, React 19, and Tailwind v4 in one learning pathโ€ข๐Ÿงฉ Inspect real components, layouts, and reusable patternsโ€ข๐Ÿ› ๏ธ Build production discipline, not just polished demosโ€ข๐Ÿ“š Tracks, references, and design studies in one placeโ€ข๐ŸŽฏ Nexus teaches Next.js from foundations to professional systemsโ€ขโšก App Router, React 19, and Tailwind v4 in one learning pathโ€ข๐Ÿงฉ Inspect real components, layouts, and reusable patternsโ€ข๐Ÿ› ๏ธ Build production discipline, not just polished demosโ€ข๐Ÿ“š Tracks, references, and design studies in one placeโ€ข๐ŸŽฏ Nexus teaches Next.js from foundations to professional systemsโ€ขโšก App Router, React 19, and Tailwind v4 in one learning pathโ€ข๐Ÿงฉ Inspect real components, layouts, and reusable patternsโ€ข๐Ÿ› ๏ธ Build production discipline, not just polished demosโ€ข๐Ÿ“š Tracks, references, and design studies in one placeโ€ข๐ŸŽฏ Nexus teaches Next.js from foundations to professional systemsโ€ขโšก App Router, React 19, and Tailwind v4 in one learning pathโ€ข๐Ÿงฉ Inspect real components, layouts, and reusable patternsโ€ข๐Ÿ› ๏ธ Build production discipline, not just polished demosโ€ข๐Ÿ“š Tracks, references, and design studies in one placeโ€ข
UI

PieChart

Pie and donut charts with percentage labels and custom colors via Recharts.

Preview

Installation

npm install recharts

Usage

import { PieChart } from '@/components/ui/PieChart'
const data = [
{ name: 'Chrome', value: 65 },
{ name: 'Safari', value: 18 },
{ name: 'Firefox', value: 8 },
]
export default function Page() {
return <PieChart data={data} showLabel />
}

Variants

Donut Chart

No Legend

Prompt Preview

Copy a prompt that recreates this UI

Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.

Copy-ready AI prompt

Starts from the current visual reference and project constraints.

Tweak only product-specific copy or data after the first generation pass.

Props

PropTypeDefaultDescription
data*PieChartDataPoint[]-Array of { name, value, color? } objects
heightnumber300Chart height in pixels
innerRadiusnumber0Inner radius for donut charts
outerRadiusnumber100Outer radius of the pie
showLegendbooleantrueShow segment legend
showTooltipbooleantrueShow hover tooltip
showLabelbooleanfalseShow percentage labels inside segments
startAnglenumber90Start angle for the first segment
classNamestring-Extra CSS classes for the wrapper
โ† Back to UI Components