Data binding: hierarchical and flat data
Bind nested or flat records with dataSource and size each item with weightValuePath. Leaf items are the rectangles, sized and colored from the values you assign.
AI · MCP Server and Agent Skills included
Show hierarchical or flat data as nested rectangles sized by value, with four layouts, drill-down, range, equal, and desaturation color mapping, label templates, legends, tooltips, selection, and export. AI assistants set it up for you from the current docs.
Trusted by the world’s leading companies
Now easier with AI
Coding assistants write the TreeMap setup from the current docs instead of guessing.
01For developers
The Syncfusion MCP server and Agent Skills give assistants in VS Code, Cursor, and JetBrains the current TreeMap docs and recommended patterns.
AI coding assistantMCP Server · Syncfusion React
Show car sales grouped by country, sized by sales.
search_docs“React TreeMap levels and weights” · 2 doc sections
Excerpt: imports and sample data omitted.
<TreeMapComponent dataSource={sales}
weightValuePath="sales"
leafItemSettings={{ labelPath: 'brand' }}>
<LevelsDirective>
<LevelDirective groupPath="country" />
</LevelsDirective>
</TreeMapComponent>
Documented API: weightValuePath, LevelDirective, groupPath, labelPath
ResultRendered in your app
AI coding assistantMCP Server · Syncfusion React
Lay out the items as vertical slices.
search_docs“React TreeMap layout types” · 2 doc sections
Excerpt: imports and sample data omitted.
<TreeMapComponent dataSource={gdp} weightValuePath="gdp"
layoutType="SliceAndDiceVertical" />
Documented API: layoutType
ResultRendered in your app
AI coding assistantMCP Server · Syncfusion React
Let users drill into each region and show a breadcrumb trail.
search_docs“React TreeMap drill-down with breadcrumbs” · 2 doc sections
Excerpt: imports and sample data omitted.
<TreeMapComponent dataSource={staff}
weightValuePath="count"
enableDrillDown={true} enableBreadcrumb={true}
breadcrumbConnector=" > ">
<LevelsDirective>…</LevelsDirective>
</TreeMapComponent>
Documented API: enableDrillDown, enableBreadcrumb, breadcrumbConnector
ResultRendered in your app
AI coding assistantMCP Server · Syncfusion React
Color countries by population growth: orange from 0 to 500, green from 500 to 4,000.
search_docs“React TreeMap range color mapping” · 2 doc sections
Excerpt: imports and sample data omitted.
<TreeMapComponent rangeColorValuePath="growth"
leafItemSettings={{
colorMapping: [
{ from: 0, to: 500, color: 'orange' },
{ from: 500, to: 4000, color: 'green' }] }} />
Documented API: rangeColorValuePath, colorMapping
ResultRendered in your app
AI coding assistantMCP Server · Syncfusion React
Color each state by its winning party and add a legend at the top.
search_docs“React TreeMap equal color mapping and legend” · 2 doc sections
Excerpt: imports and sample data omitted.
<TreeMapComponent equalColorValuePath="winner"
legendSettings={{ visible: true, position: 'Top' }}>
<Inject services={[TreeMapLegend]} />
</TreeMapComponent>
Documented API: equalColorValuePath, legendSettings, TreeMapLegend
ResultRendered in your app
AI coding assistantMCP Server · Syncfusion React
Show the sport and medal count in each item with a custom template.
search_docs“React TreeMap labels and templates” · 2 doc sections
Excerpt: imports and sample data omitted.
<TreeMapComponent
leafItemSettings={{ labelPath: 'sport',
labelFormat: '${sport} - ${gold}',
interSectAction: 'WrapByWord',
labelTemplate: medalTemplate }} />
Documented API: labelFormat, labelTemplate, interSectAction
ResultRendered in your app
AI coding assistantMCP Server · Syncfusion React
Highlight items on hover and select them on click.
search_docs“React TreeMap selection and highlight” · 2 doc sections
Excerpt: imports and sample data omitted.
<TreeMapComponent
selectionSettings={{ enable: true, fill: '#58a0d3' }}
highlightSettings={{ enable: true, fill: '#a5c8e8' }}>
<Inject services={[TreeMapSelection, TreeMapHighlight]} />
</TreeMapComponent>
Documented API: selectionSettings, highlightSettings
ResultRendered in your app
AI coding assistantMCP Server · Syncfusion React
Add buttons that export the treemap to PDF and print it.
search_docs“React TreeMap print and export” · 2 doc sections
Excerpt: imports and sample data omitted.
<TreeMapComponent ref={map} allowPdfExport={true}
allowPrint={true}>
<Inject services={[PdfExport, Print]} />
</TreeMapComponent>
map.current?.export('PDF', 'sales');
map.current?.print();
Documented API: allowPdfExport, allowPrint, export, print
ResultRendered in your app
Features in depth
Open a demo to try each one, or the docs to see the API.
Bind nested or flat records with dataSource and size each item with weightValuePath. Leaf items are the rectangles, sized and colored from the values you assign.
Color items by numeric ranges, by equal values such as a winning candidate, or by desaturation from high to low. Palettes color items when no mapping applies.
labelPath and labelFormat set the text, and interSectAction trims, hides, or wraps labels wider than their item. labelTemplate renders any HTML, even a pie chart.
Keyboard navigation and screen reader support meet WCAG 2.2. enableRtl mirrors nodes, headers, labels, and legends, numbers follow the locale, and themes include Tailwind CSS, Bootstrap, Material, and Fluent.
Get started
With an AI coding assistant
Add a Syncfusion React TreeMap to my sales report showing sales by region and country, with drill-down and colors by growth.
By hand, in three steps
1 · Install
npm install @syncfusion/ej2-react-treemap --save
2 · Theme
<TreeMapComponent theme="Tailwind3" />
3 · src/App.tsx
import { TreeMapComponent, LevelsDirective, LevelDirective } from '@syncfusion/ej2-react-treemap';
const sales = [
{ region: 'Europe', country: 'Germany', sales: 340 },
{ region: 'Europe', country: 'France', sales: 280 },
{ region: 'Asia', country: 'Japan', sales: 410 },
{ region: 'Asia', country: 'India', sales: 190 }
];
export default function App() {
return (
<TreeMapComponent dataSource={sales} weightValuePath="sales" theme="Tailwind3" leafItemSettings={{ labelPath: 'country' }}>
<LevelsDirective><LevelDirective groupPath="region" /></LevelsDirective>
</TreeMapComponent>
);
}
Works withReact 15.5.4 or laterTypeScript and JavaScriptNext.jsRemixGatsbyVitePreactSystem requirements
Customer reviews
“Awesome, enough said”
Easy usability, solving real-life problems, easy to implement. Most of the cases have the operators and settings possibilities you need right away.
“A giant framework with great pricing options”
I have loved the components and options that Syncfusion has; besides, its documentation, demos, and support are excellent.
Customer story · Igniatek
“I would definitely recommend Syncfusion for anyone who is trying to develop something meaningful.”
Somnath Maji, Founder, Igniatek Consultancy
Including the 2026 Devies Award, Capterra Shortlist 2026, Software Advice FrontRunners 2026, and G2 Best Software 2025.
Complete feature list
Showing all 34 features. Each one opens its demo or documentation.
No feature matches that search. Try another word, or open the TreeMap demos.
Related data visualization components:React ChartsReact Stock ChartReact HeatMapReact Circular Gauge
Questions and answers
The Syncfusion React TreeMap shows hierarchical or flat data as nested rectangles, where each rectangle's size shows its value. It adds drill-down, color mapping, labels, legends, and export. Explore the demos
Use a treemap when the data has many items or several levels, such as sales by region and country, because nested rectangles fit more items in less space. React Charts
Install @syncfusion/ej2-react-treemap and render TreeMapComponent with a dataSource and a weightValuePath. Add a LevelDirective for each grouping level. Read the getting started guide
Squarified, slice and dice horizontal, slice and dice vertical, and slice and dice auto, set with layoutType. Layout demo
Set enableDrillDown and users click a parent to see its children. enableBreadcrumb shows the path back to upper levels. Drill-down demo
Set rangeColorValuePath with colorMapping ranges, equalColorValuePath for categories, or minOpacity and maxOpacity for desaturation. Read about color mapping
Yes. labelFormat combines fields, interSectAction trims, hides, or wraps long labels, and labelTemplate renders any HTML. Label template demo
Yes. Inject TreeMapLegend and set legendSettings.visible. The Interactive mode marks the range of the hovered item. Read about the legend
Yes. Inject TreeMapSelection and TreeMapHighlight, then enable selectionSettings and highlightSettings. Selection demo
Yes. The export method saves it as PNG, JPEG, SVG, or PDF on the client, and print prints it from the browser. Print and export demo
Yes. It supports keyboard navigation and screen readers, meets WCAG 2.2 and Section 508, and renders right to left. Read about accessibility
Yes. The Syncfusion MCP server and Agent Skills give assistants in VS Code, Cursor, and JetBrains the current TreeMap docs and recommended patterns. You need a Syncfusion API key and an active license, which can be a commercial, Community, or trial license. Set up the MCP server
It is a commercial component with a 30-day free trial. A free Community License is available for companies and individuals with less than $1 million USD in annual gross revenue, five or fewer developers, and 10 or fewer total employees. Check Community License eligibility
Resources
TreeMap for other frameworks:AngularBlazorJavaScriptVue
More React components:ChartsHeatMapMapsAll 140+ React components
Syncfusion React TreeMap
The full TreeMap, the MCP server, and Agent Skills, free for 30 days.