Launch sale — 60% off Pro
Contact
ChartPie

Not affiliated with official shadcn/ui. Visit ui.shadcn.com for official docs.

React A donut chart with an active sector

A React donut chart with active sector highlighting that expands outward to emphasize selected slice using shadcn/ui and Recharts

Looking to implement shadcn/ui patterns?

Join our Discord community for help from other developers.


Static charts hide context. This React donut chart uses activeIndex and activeShape with Sector to make one slice pop out, expanding its outerRadius by 10px for visual emphasis. Built with shadcn/ui and Recharts, the active sector draws attention to specific data—like highlighting this month's performance or the user's current selection. The expansion is subtle but effective, creating hierarchy without labels or legends. Perfect for dashboards with focus states, data storytelling where one category needs emphasis, or interactive charts where users select slices to drill down into details.

Pattern created by @haydenbleasel

Installation

Questions you might have