コンポーネント研究 / 統計
プログレスの統計
進捗バーと説明を組み合わせて数値を伝える2カラムのカード。
モダンミニマルサンセリフ2カラムカードグリッドレスポンシブSaaSエンタープライズAI
ライブプレビュー
表示幅: 1440px。画面に合わせて縮小しています。原寸での操作や長いセクションの確認には、プレビューを開いてください。
'use client';
const COLORS = {
light: {
background: '#FFFFFF',
heading: '#111111',
subheading: '#555555',
cardBg: '#FAFAFA',
number: '#111111',
label: '#333333',
description: '#888888',
barBg: '#E5E5E5',
barFill: '#6C4BEF',
},
dark: {
background: '#0A0A0A',
heading: '#FFFFFF',
subheading: '#999999',
cardBg: '#111111',
number: '#FFFFFF',
label: '#CCCCCC',
description: '#777777',
barBg: '#1A1A1A',
barFill: '#A78BFA',
},
} as const;
interface StatItem {
label: string;
value: string;
description: string;
percentage: number;
}
interface SampleStats2Props {
mode?: 'light' | 'dark';
title?: string;
subtitle?: string;
stats?: StatItem[];
}
export default function SampleStats2({
mode = 'dark',
title = '성과 지표',
subtitle = '데이터로 증명하는 우리의 성과',
stats = [
{ label: '고객 만족도', value: '98%', description: 'NPS 점수 기반', percentage: 98 },
{ label: '코드 품질', value: '95%', description: '정적 분석 통과율', percentage: 95 },
{ label: '배포 속도', value: '3x', description: '업계 평균 대비', percentage: 85 },
{ label: '비용 절감', value: '40%', description: '운영 비용 기준', percentage: 40 },
],
}: SampleStats2Props) {
const colors = COLORS[mode];
return (
<section className="px-6 py-24" style={{ backgroundColor: colors.background }}>
<div className="max-w-5xl mx-auto">
<div className="text-center mb-16">
<h2 className="text-4xl md:text-5xl font-bold" style={{ color: colors.heading }}>
{title}
</h2>
<p className="mt-4 text-lg" style={{ color: colors.subheading }}>
{subtitle}
</p>
</div>
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
{stats.map((stat, i) => (
<div key={i} className="rounded-2xl p-8" style={{ backgroundColor: colors.cardBg }}>
<div className="flex items-baseline justify-between mb-2">
<span className="text-sm font-medium" style={{ color: colors.label }}>
{stat.label}
</span>
<span className="text-2xl font-bold" style={{ color: colors.number }}>
{stat.value}
</span>
</div>
<p className="text-xs mb-4" style={{ color: colors.description }}>
{stat.description}
</p>
<div className="h-2 rounded-full" style={{ backgroundColor: colors.barBg }}>
<div
className="h-2 rounded-full transition-all"
style={{ width: `${stat.percentage}%`, backgroundColor: colors.barFill }}
/>
</div>
</div>
))}
</div>
</div>
</section>
);
}