EmpireUI
Sign inGet Pro
Free · MIT · React + Tailwind

Bar Chart

A free, copy-paste bar chart for React and Tailwind with responsive vertical and horizontal layouts. Perfect for comparing values across categories in any dashboard.

Sales by month

Copy the code

export function BarChart() {
  const data = [40, 65, 50, 80, 60, 95]
  return (
    <div className="w-72 rounded-2xl border border-white/10 bg-white/5 p-4 text-white">
      <p className="mb-3 text-sm text-white/60">Sales by month</p>
      <div className="flex h-20 items-end gap-2.5">
        {data.map((h, i) => (
          <div key={i} style={{ height: `${h}%` }}
            className={`flex-1 rounded-md ${i === data.length - 1 ? 'bg-violet-600' : 'bg-violet-600/40'}`} />
        ))}
      </div>
    </div>
  )
}

Tailwind CSS · no dependencies · MIT licensed. Paste it straight into any React, Next.js or Vite project.

About the bar chart

This bar chart is part of Empire UI — a free, open-source library of 26+ component types rendered across 40 visual styles, from glassmorphism to neo-brutalism. Every block is copy-paste ready in React and Tailwind CSS with no runtime dependencies.

Want it in a different look? Browse all 40 styles or grab the matching glassmorphism components.

Related data components

Area ChartData Table