Files
2026-02-09 17:10:50 +00:00

111 lines
3.7 KiB
JSON

{
"name": "FeatureCardEight",
"description": "Horizontal timeline feature section with auto-advancing progress bars, numbered step badges, and shared media display.",
"constraints": {
"textRules": {
"title": {
"required": true,
"example": "Our Process",
"minChars": 2,
"maxChars": 35
},
"description": {
"required": true,
"example": "Discover how we bring ideas to life",
"minChars": 5,
"maxChars": 250
},
"tag": {
"required": false,
"example": "How It Works",
"minChars": 2,
"maxChars": 30
}
},
"featureCardRules": {
"id": {
"required": true,
"example": "1",
"minChars": 1,
"maxChars": 3,
"note": "Step number displayed in circular badge"
},
"title": {
"required": true,
"example": "Research & Planning",
"minChars": 2,
"maxChars": 50
},
"description": {
"required": true,
"example": "Understanding user needs, market trends, and project requirements",
"minChars": 10,
"maxChars": 300
}
},
"mediaRules": {
"imageSrc": {
"required": true,
"example": "/feature1.jpg",
"note": "Either imageSrc or videoSrc required per card (discriminated union)"
},
"videoSrc": {
"required": true,
"example": "/feature1.mp4",
"note": "Either imageSrc or videoSrc required per card (discriminated union)"
},
"imageAlt": {
"required": false,
"example": "Research and planning illustration",
"note": "Falls back to feature title if not provided"
},
"videoAriaLabel": {
"required": false,
"example": "Research and planning video",
"note": "Falls back to feature title if not provided"
}
},
"itemRules": {
"minItems": 2,
"maxItems": 4,
"recommendedItems": "2-4",
"note": "Works best with 2-4 features. Grid layout adapts based on item count."
}
},
"propsSchema": {
"features": "Array<{ id: number, title: string, description: string } & ({ imageSrc: string, imageAlt?: string } | { videoSrc: string, videoAriaLabel?: 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: 'Feature section')",
"className?": "string"
},
"usageExample": "<FeatureCardEight features={[{ id: 1, title: 'Research & Planning', description: 'Understanding user needs, market trends, and project requirements', imageSrc: '/feature1.jpg' }]} title=\"Our Process\" description=\"Discover how we bring ideas to life\" textboxLayout=\"default\" useInvertedBackground={\"noInvert\"} />",
"do": [
"Use for process flows",
"Use for roadmaps",
"Use for step-by-step explanation",
"Use for feature showcases",
"Use for capability displays",
"Requires features[]",
"Requires titleSegments?[]",
"Requires buttons?[]"
],
"dont": [
"Do not use non-sequential content",
"Do not use single item",
"Do not use more than 4 items",
"Do not use less than 2 items",
"Do not use more than 4 items"
],
"editRules": {
"textOnly": true,
"layoutLocked": true,
"styleLocked": true
}
}