コンポーネント研究 / 統計
4カラムの統計
アイコンと区切り線で数値を読み分ける、4列の統計セクション。
モダン大胆ダークテーマサンセリフ4カラムカードグリッドレスポンシブSaaSエンタープライズ
ライブプレビュー
表示幅: 1440px。画面に合わせて縮小しています。原寸での操作や長いセクションの確認には、プレビューを開いてください。
'use client';
const COLORS = {
light: {
background: '#F5F5F5',
number: '#111111',
label: '#777777',
icon: '#6C4BEF',
divider: '#E0E0E0',
},
dark: {
background: '#111111',
number: '#FFFFFF',
label: '#888888',
icon: '#A78BFA',
divider: '#222222',
},
} as const;
interface Stat {
icon: string;
value: string;
label: string;
}
interface SampleStats1Props {
mode?: 'light' | 'dark';
stats?: Stat[];
}
export default function SampleStats1({
mode = 'dark',
stats = [
{ icon: '👥', value: '50,000+', label: '활성 사용자' },
{ icon: '⚡', value: '99.9%', label: '가동률' },
{ icon: '🏢', value: '200+', label: '기업 고객' },
{ icon: '⭐', value: '4.8', label: '사용자 평점' },
],
}: SampleStats1Props) {
const colors = COLORS[mode];
return (
<section className="px-6 py-20" style={{ backgroundColor: colors.background }}>
<div className="max-w-5xl mx-auto">
<div className="grid grid-cols-2 md:grid-cols-4 gap-8">
{stats.map((stat, i) => (
<div
key={i}
className="text-center py-4"
style={{
borderRight: i < stats.length - 1 ? `1px solid ${colors.divider}` : 'none',
}}
>
<div className="text-3xl mb-3">{stat.icon}</div>
<div className="text-3xl md:text-4xl font-bold" style={{ color: colors.number }}>
{stat.value}
</div>
<div className="mt-2 text-sm" style={{ color: colors.label }}>
{stat.label}
</div>
</div>
))}
</div>
</div>
</section>
);
}