Storage68.4 GB of 100 GB
- Video31.2 GB · 46%
- Photos18.5 GB · 27%
- Documents9.7 GB · 14%
- Apps9 GB · 13%
Installation
$ pnpm dlx shadcn@latest add @synccn/category-barFirst time in this project? Connect synccn with one command.
Usage
import { CategoryBar } from "@/components/ui/data-viz";<CategoryBar data={usage} />API reference
Generated from the component's TypeScript types, so it always matches the code.
CategoryBar
One bar split into proportional segments with a legend. data: [{ label, value, color? }]
PropTypeDescription
- datarequired
{ label: string; value: number; color?: string }[]Segments.
- format
(value: number) => React.ReactNodeDefault
(v) => vFormats legend values.
- className
stringExtra classes for the root element.
Dependencies
Read from the component's imports when the site builds. The CLI installs all of these for you.
Helpers
- lib/utilscn (merges class names)
npm packages
- clsx for cn()
- tailwind-merge for cn()
Accessibility
From the source
Read from this component's code when the site builds, so it can't drift.
- ARIA attributes: aria-label
More data
Data TableSorting, search, column visibility, selection and paging.Bar ChartResponsive SVG bars with tooltips and an entrance.Area ChartSmooth area with a crosshair tooltip.SparklineTiny trend line coloured by direction.HeatmapContribution-style calendar of daily counts.KanbanDrag cards between columns.