Files
d8cbcfc1-cd31-4f78-9837-557…/registry/components/MetricCardOne.json
vitalijmulika b37a4ddd3b Initial commit
2026-02-09 19:05:46 +02:00

91 lines
3.4 KiB
JSON

{
"name": "MetricCardOne",
"description": "Metric card with large gradient value text, title, description, and icon badge.",
"constraints": {
"textRules": {
"title": {
"required": true,
"example": "Our Impact",
"minChars": 2,
"maxChars": 35
},
"description": {
"required": true,
"example": "Key metrics that showcase our growth and success",
"minChars": 5,
"maxChars": 250
},
"tag": {
"required": false,
"example": "Statistics",
"minChars": 2,
"maxChars": 30
}
},
"metricRules": {
"id": {
"required": true,
"example": "1",
"minChars": 1,
"maxChars": 20
},
"value": {
"required": true,
"example": "100",
"minChars": 1,
"maxChars": 5,
"note": "Large metric value displayed with gradient effect."
},
"title": {
"required": true,
"example": "million",
"minChars": 2,
"maxChars": 30,
"note": "Metric label displayed below value with negative margin overlap"
},
"description": {
"required": true,
"example": "Active users worldwide",
"minChars": 5,
"maxChars": 150,
"note": "Supporting description text displayed below title"
},
"icon": {
"required": true,
"example": "TrendingUp",
"note": "Lucide icon displayed in bottom-left corner with primary-button styling"
}
}
},
"propsSchema": {
"metrics": "Array<{ id: string, value: string, title: string, description: string, icon: LucideIcon }>",
"carouselMode?": "'auto' | 'buttons' (default: 'buttons')",
"gridVariant": "'uniform-all-items-equal' | 'bento-grid' | 'bento-grid-inverted' (required)",
"animationType": "'none' | 'opacity' | 'slide-up' | 'scale-rotate' | 'blur-reveal' (required - controls GSAP scroll animations with stagger effect)",
"uniformGridCustomHeightClasses?": "string",
"title": "string",
"titleSegments?": "Array<{ type: 'text', content: string } | { type: 'image', src: string, alt?: string }> - For inline images in title",
"description": "string",
"tag?": "string",
"tagIcon?": "LucideIcon",
"buttons?": "Array<{text: string, onClick?: () => void, href?: string}>",
"textboxLayout": "'default' | 'split' | 'split-actions' | 'split-description' | 'inline-image' (required - 'inline-image' uses titleSegments for rich text with images)",
"useInvertedBackground": "'noInvert' | 'invertDefault'",
"ariaLabel?": "string (default: 'Metrics section')",
"className?": "string"
},
"usageExample": "<MetricCardOne metrics={[{ id: '1', value: '100', title: 'million', description: 'Active users worldwide', icon: TrendingUp }, { id: '2', value: '700', title: 'thousand', description: 'Projects completed successfully', icon: Users }]} title=\"Our Impact\" description=\"See how we're making a difference\" gridVariant=\"uniform-all-items-equal\" textboxLayout=\"default\" animationType=\"slide-up\" useInvertedBackground={\"noInvert\"} />",
"do": [
"Use for statistics displays",
"Use for achievement showcases",
"Requires metrics[]",
"Requires titleSegments?[]",
"Requires buttons?[]"
],
"dont": [],
"editRules": {
"textOnly": true,
"layoutLocked": true,
"styleLocked": true
}
}