Treemap
Preview
Portfolio allocation
Demo data
- Technology
- Healthcare
- Finance
- Energy
Install
Add it with your package manager, or copy the source manually.
Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide
Download the release archive to your project root, then install the local file.
Import the shared styles once in your application.
API Reference
Treemap
datareadonly TreemapNode[]Flat leaves or nested groups. Tile area uses leaf values; groups sum their descendants.
—label?string—formatValue?(value: number) => string—colors?readonly string[]Top-level palette; nodes can override their inherited color and textColor.
—textColor?string—v-model:activeId?string | null—defaultActiveId?string | null—@active-change?(id: string | null) => void—labels?Partial<TreemapMessages>Override any built-in string.
—class?string—#default?slotCompose `TreemapPlot`, `TreemapTooltip` and `TreemapLegend`; omit it for the complete chart.
—TreemapLegend
class?string—showValues?booleanfalseTreemapPlot
class?stringSets the plot height; default 20rem. The layout follows its measured dimensions.
—tileClass?stringClasses added to every tile button.
—#renderTile?{ tile: TreemapTileData }Presentation content for one tile; each tile still owns its button and accessible name.
—TreemapTooltip
class?string—side?"top" | "right" | "bottom" | "left"top#default?{ item: TreemapItem }Replaces the default content. Receives the inspected item.
—Updated