Back to Components

Bar Chart

Charts

Interactive bar charts with smooth animations and hover effects for comparing categorical data.

Installation

$npx linspo-ui add bar-chart
Dependencies: lucide-react

User Engagement

6 categories

70%

+8.2%
Mobile65%
Desktop85%
Tablet45%
Web App92%
API78%
Other56%

92%

Highest

6

Categories

70%

Average

Props

PropTypeDefaultDescription
data*BarChartDataPoint[]Array of data points with label and value properties.
classNamestringAdditional CSS classes to apply to the container.
titlestringTitle displayed in the chart header.
metricstring"User Engagement"Label for the metric being displayed.
showLabelsbooleantrueWhether to show labels for each bar.
showStatsbooleantrueWhether to show the stats footer.
changenumberPercentage change to display in the header.
changeType"increase" | "decrease" | "neutral""increase"Type of change, affects the color of the indicator.
animatedbooleantrueWhether to animate the bars on mount.