Files
f51dbb83-e16f-4e42-abf4-95d…/registry/components/BlogCardFive.json
2026-01-27 13:40:24 +02:00

108 lines
4.1 KiB
JSON

{
"name": "BlogCardFive",
"description": "Blog section with TextBox header and fixed 2-column grid layout with horizontal blog cards and metadata items.",
"constraints": {
"textRules": {
"title": {
"required": true,
"example": "Latest Articles",
"minChars": 2,
"maxChars": 50
},
"description": {
"required": true,
"example": "Discover our latest insights and stories",
"minChars": 5,
"maxChars": 250
},
"tag": {
"required": false,
"example": "Blog",
"minChars": 2,
"maxChars": 30
}
},
"blogRules": {
"id": {
"required": true,
"example": "1",
"minChars": 1,
"maxChars": 20
},
"title": {
"required": true,
"example": "The Future of Web Development: Exploring New Technologies and Trends",
"minChars": 10,
"maxChars": 150,
"note": "Blog post title shown at text-3xl size, supports longer titles"
},
"items": {
"required": true,
"minItems": 1,
"maxItems": 5,
"structure": "string[]",
"example": "['Technology', 'Jan 15, 2025', '5 min read']",
"note": "Flexible metadata items (category, date, author, read time, etc.) displayed inline with bullet separators"
},
"imageSrc": {
"required": false,
"example": "/blog-1.jpg",
"note": "Either imageSrc or videoSrc should be provided"
},
"videoSrc": {
"required": false,
"example": "/blog-1.mp4",
"note": "Either imageSrc or videoSrc should be provided"
},
"imageAlt": {
"required": false,
"example": "Future of web development illustration",
"note": "Falls back to blog title if not provided"
},
"videoAriaLabel": {
"required": false,
"example": "Future of web development video",
"note": "Falls back to blog title if not provided"
}
},
"itemRules": {
"minItems": 1,
"maxItems": 10,
"recommendedItems": "2-6",
"note": "Always displays as 2-column grid on desktop, 1 column on mobile. Works best with even number of posts (2, 4, 6)."
}
},
"propsSchema": {
"blogs": "Array<{ id: string, title: string, items: string[], imageSrc?: string, videoSrc?: string, imageAlt?: string, videoAriaLabel?: string }>",
"animationType": "'none' | 'opacity' | 'slide-up' | 'scale-rotate' | 'blur-reveal' (required)",
"title": "string",
"titleSegments?": "Array<{ type: 'text', content: string } | { type: 'image', src: string, alt?: string }> - For inline images in title",
"description": "string",
"textboxLayout": "'default' | 'split' | 'split-actions' | 'split-description' | 'inline-image' (required - 'inline-image' uses titleSegments for rich text with images)",
"useInvertedBackground": "'noInvert' | 'invertDefault'",
"tag?": "string",
"tagIcon?": "LucideIcon",
"buttons?": "Array<{text: string, onClick?: () => void, href?: string}>",
"ariaLabel?": "string (default: 'Blog section')",
"className?": "string"
},
"usageExample": "<BlogCardFive blogs={[{ id: '1', title: 'The Future of Web Development: Exploring New Technologies and Trends', items: ['Technology', 'Jan 15, 2025', '5 min read'], imageSrc: '/blog1.jpg' }, { id: '2', title: 'Mastering TypeScript for Modern Application Development', items: ['Development', 'Jan 12, 2025', '8 min read'], imageSrc: '/blog2.jpg' }]} animationType=\"slide-up\" title=\"Latest Articles\" description=\"Discover our latest insights and stories\" textboxLayout=\"default\" useInvertedBackground={\"invertDefault\"} tag=\"Blog\" />",
"do": [
"Use for feature showcases",
"Use for capability displays",
"Use for blog listings",
"Use for article grids",
"Requires blogs[]",
"Requires titleSegments?[]",
"Requires buttons?[]"
],
"dont": [
"Do not use more than 4 items",
"Do not use more than 10 items"
],
"editRules": {
"textOnly": true,
"layoutLocked": true,
"styleLocked": true
}
}