diff --git a/registry/components/BlogCardOne.json b/registry/components/BlogCardOne.json new file mode 100644 index 0000000..d243f14 --- /dev/null +++ b/registry/components/BlogCardOne.json @@ -0,0 +1,90 @@ +{ + "name": "BlogCardOne", + "description": "Blog section with card grid/carousel layout featuring image, category, title, excerpt, and author info.", + "details": "Use for displaying blog posts or articles. Uses CardStack for adaptive layout (grid for 1-4 items, carousel for 5+). Card structure: Image with overlay arrow button → Category badge → Title → Excerpt → Author (avatar + name + date). Image has zoom effect on hover. Category displayed in primary-button badge. Optional header with title, description, tag, and buttons via CardStack. Best for blog pages, news sections, or article listings.", + "constraints": { + "textRules": { + "title": { + "required": true, + "example": "Latest Articles", + "minChars": 2, + "maxChars": 50 + }, + "description": { + "required": true, + "example": "Insights and updates from our team", + "minChars": 5, + "maxChars": 250 + }, + "tag": { + "required": false, + "example": "Blog", + "minChars": 2, + "maxChars": 30 + } + }, + "blogRules": { + "blogs": { + "required": true, + "minItems": 1, + "example": "[{\"id\": \"1\", \"category\": \"Design\", \"title\": \"UX review presentations\", \"excerpt\": \"How to create compelling presentations\", \"imageSrc\": \"/blog-1.jpg\", \"authorName\": \"John Doe\", \"authorAvatar\": \"/avatar-1.jpg\", \"date\": \"20 Jan 2025\"}]", + "note": "Array of blog items. Each item requires id, category, title, excerpt, imageSrc, authorName, authorAvatar, and date." + } + } + }, + "propsSchema": { + "blogs": "Array<{ id: string, category: string, title: string, excerpt: string, imageSrc: string, imageAlt?: string, authorName: string, authorAvatar: string, date: string, onBlogClick?: () => void }> - Blog card items", + "carouselMode?": "'auto' | 'buttons' (default: 'buttons')", + "uniformGridCustomHeightClasses?": "string", + "animationType": "'none' | 'opacity' | 'slide-up' | 'scale-rotate' | 'blur-reveal' (required - controls GSAP scroll animations with stagger effect)", + "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", + "tagAnimation?": "'none' | 'opacity' | 'slide-up' | 'blur-reveal'", + "buttons?": "Array<{text: string, onClick?: () => void, href?: string}>", + "buttonAnimation?": "'none' | 'opacity' | 'slide-up' | 'blur-reveal'", + "textboxLayout": "'default' | 'split' | 'split-actions' | 'split-description' | 'inline-image' (required - 'inline-image' uses titleSegments for rich text with images)", + "useInvertedBackground": "boolean", + "ariaLabel?": "string (default: 'Blog section')", + "className?": "string", + "containerClassName?": "string", + "cardClassName?": "string", + "imageWrapperClassName?": "string", + "imageClassName?": "string", + "categoryClassName?": "string", + "cardTitleClassName?": "string", + "excerptClassName?": "string", + "authorContainerClassName?": "string", + "authorAvatarClassName?": "string", + "authorNameClassName?": "string", + "dateClassName?": "string", + "textBoxTitleClassName?": "string", + "textBoxTitleImageWrapperClassName?": "string - For styling image wrapper in inline-image layout", + "textBoxTitleImageClassName?": "string - For styling images in inline-image layout", + "textBoxDescriptionClassName?": "string", + "gridClassName?": "string", + "carouselClassName?": "string", + "controlsClassName?": "string", + "textBoxClassName?": "string", + "textBoxTagClassName?": "string", + "textBoxButtonContainerClassName?": "string", + "textBoxButtonClassName?": "string", + "textBoxButtonTextClassName?": "string" + }, + "usageExample": " console.log('clicked')}]} title=\"Latest Articles\" description=\"Stay updated with our latest insights\" textboxLayout=\"default\" useInvertedBackground={false} animationType=\"slide-up\" carouselMode=\"buttons\" />", + "do": [ + "Use for blog listings", + "Use for article grids", + "Requires blogs[]", + "Requires titleSegments?[]", + "Requires buttons?[]" + ], + "dont": [], + "editRules": { + "textOnly": true, + "layoutLocked": true, + "styleLocked": true + } +}