Bar Chart

Vertical and horizontal bars with hatch, duotone, gradient, stripe, stack, and glow fills.

variant='default'

@spectrumui/bar-chart
  • Desktop
  • Mobile

variant='hatched'

  • Desktop
  • Mobile

variant='duotone'

  • Desktop
  • Mobile

variant='duotone-reverse'

  • Desktop
  • Mobile

variant='gradient'

  • Desktop
  • Mobile

variant='stripped'

  • Desktop
  • Mobile

stackType='stacked'

  • Desktop
  • Mobile

stackType='percent'

  • Desktop
  • Mobile

layout='horizontal'

  • Desktop
  • Mobile

glowing

  • Desktop
  • Mobile

Manual installation

Prefer to copy by hand? Open the Code tab on any example above and switch to the file you need — every source file is there, not just the demo. Drop them in your project like this:

  • chart-kit.tsxcomponents/spectrumui/charts/chart-kit.tsx
  • bar-chart.tsxcomponents/spectrumui/charts/bar-chart.tsx

Then install its dependencies: npm i recharts framer-motion

Usage

import { BarChart } from '@/components/spectrumui/charts/bar-chart';

<BarChart data={data} variant="gradient" />
Work with me