Loading...
Loading...
The StatsBar component displays key facts and statistics in a scannable bar format. Perfect for city facts, region stats, attraction details, and other numerical information.
Display key city facts in a scannable bar format.
Regional information and key facts.
Practical information for attractions and points of interest.
Some stats can span multiple columns using the wide property.
import { StatsBar } from '@/components/composite/StatsBar';
const stats = [
{ label: 'Population', value: '2.8M' },
{ label: 'Area', value: '1,285 km²' },
{ label: 'Founded', value: '753 BC' },
{ label: 'Language', value: 'Italian' },
{ label: 'Currency', value: 'EUR' },
];
<StatsBar stats={stats} bg="bg-white" />
// With wide item
const statsWithWide = [
{ label: 'Population', value: '2.8M' },
{ label: 'Area', value: '1,285 km²', wide: true },
{ label: 'Founded', value: '753 BC' },
];stats: StatItem[] - Array of stat items (required)bg?: string - Background color class (default: 'bg-white')className?: string - Additional CSS classeslabel: string - Stat label (required)value: string - Stat value (required)wide?: boolean - Whether item spans multiple columns