Bar Chart
Vertical and horizontal bars with hatch, duotone, gradient, stripe, stack, and glow fills.
variant='default'
@spectrumui/bar-chart
- Desktop
- Mobile
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
variant='hatched'
- Desktop
- Mobile
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
variant='duotone'
- Desktop
- Mobile
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
variant='duotone-reverse'
- Desktop
- Mobile
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
variant='gradient'
- Desktop
- Mobile
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
variant='stripped'
- Desktop
- Mobile
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
stackType='stacked'
- Desktop
- Mobile
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
stackType='percent'
- Desktop
- Mobile
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
layout='horizontal'
- Desktop
- Mobile
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
glowing
- Desktop
- Mobile
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
Login to view codeCreate a free account to access component source code
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.tsxbar-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" />