102 lines
4.1 KiB
JSON
102 lines
4.1 KiB
JSON
{
|
|
"name": "HeroCentered",
|
|
"description": "Full-screen centered hero section with avatar group above title, centered text content, configurable background, and optional buttons.",
|
|
"constraints": {
|
|
"textRules": {
|
|
"title": {
|
|
"required": true,
|
|
"example": "Build Modern Web Experiences",
|
|
"minChars": 2,
|
|
"maxChars": 40
|
|
},
|
|
"description": {
|
|
"required": true,
|
|
"example": "Create stunning, responsive websites with our comprehensive component library",
|
|
"minChars": 5,
|
|
"maxChars": 200
|
|
},
|
|
"avatarText": {
|
|
"required": false,
|
|
"example": "Trusted by 1000+ users",
|
|
"minChars": 2,
|
|
"maxChars": 50
|
|
}
|
|
},
|
|
"avatarRules": {
|
|
"avatars": {
|
|
"required": true,
|
|
"minItems": 1,
|
|
"maxItems": 5,
|
|
"structure": {
|
|
"src": "string - Avatar image source",
|
|
"alt": "string - Alt text for accessibility"
|
|
},
|
|
"note": "Avatars are displayed above the title for social proof"
|
|
}
|
|
},
|
|
"buttonRules": {
|
|
"maxButtons": 2,
|
|
"structure": {
|
|
"text": "string - Button label",
|
|
"href": "string - Link destination (optional)",
|
|
"onClick": "() => void - Additional click handler (optional)",
|
|
"props": "Partial<ButtonPropsForVariant> - Additional button props (optional)"
|
|
},
|
|
"note": "Button variant is controlled by ThemeProvider's defaultButtonVariant."
|
|
},
|
|
"marqueeRules": {
|
|
"required": false,
|
|
"structure": {
|
|
"items": "MarqueeItem[] - Array of items with text, optional icon/image",
|
|
"speed": "number - Scroll speed (default: 30)",
|
|
"showCard": "boolean - Whether to show card styling (default: true)"
|
|
},
|
|
"note": "Optional logo marquee positioned at bottom of hero"
|
|
}
|
|
},
|
|
"propsSchema": {
|
|
"title": "string",
|
|
"description": "string",
|
|
"background": "{ variant: 'plain' | 'animated-grid' | 'canvas-reveal' | 'cell-wave' | 'downward-rays-animated' | 'downward-rays-animated-grid' | 'downward-rays-static' | 'downward-rays-static-grid' | 'gradient-bars' | 'radial-gradient' | 'rotated-rays-animated' | 'rotated-rays-animated-grid' | 'rotated-rays-static' | 'rotated-rays-static-grid' | 'sparkles-gradient' }",
|
|
"avatars": "Avatar[] (required) - Array with src and alt",
|
|
"avatarText?": "string",
|
|
"buttons?": "ButtonConfig[]",
|
|
"buttonAnimation?": "'none' | 'opacity' | 'slide-up' | 'blur-reveal'",
|
|
"marqueeItems?": "MarqueeItem[]",
|
|
"marqueeSpeed?": "number (default: 30)",
|
|
"showMarqueeCard?": "boolean (default: true)",
|
|
"ariaLabel?": "string (default: 'Hero section')",
|
|
"className?": "string",
|
|
"containerClassName?": "string",
|
|
"textBoxClassName?": "string",
|
|
"titleClassName?": "string",
|
|
"descriptionClassName?": "string",
|
|
"avatarGroupClassName?": "string",
|
|
"buttonContainerClassName?": "string",
|
|
"buttonClassName?": "string",
|
|
"buttonTextClassName?": "string",
|
|
"marqueeClassName?": "string",
|
|
"marqueeItemClassName?": "string",
|
|
"marqueeCardClassName?": "string",
|
|
"marqueeImageClassName?": "string",
|
|
"marqueeTextClassName?": "string",
|
|
"marqueeIconClassName?": "string"
|
|
},
|
|
"usageExample": "<ThemeProvider defaultButtonVariant=\"icon-arrow\" borderRadius=\"rounded\">\n <HeroCentered\n title=\"Build Modern Web Experiences\"\n description=\"Create stunning, responsive websites with our component library.\"\n background={{ variant: 'plain' }}\n avatars={[\n { src: '/avatar1.jpg', alt: 'User 1' },\n { src: '/avatar2.jpg', alt: 'User 2' },\n { src: '/avatar3.jpg', alt: 'User 3' }\n ]}\n avatarText=\"Trusted by 1000+ users\"\n buttons={[{ text: 'Get Started', href: '#' }]}\n />\n</ThemeProvider>",
|
|
"do": [
|
|
"Use for impactful landing pages with social proof emphasis",
|
|
"Include avatars for social proof",
|
|
"Use appropriate background variant",
|
|
"Full viewport height - purely text-focused hero"
|
|
],
|
|
"dont": [
|
|
"Do not use without avatars",
|
|
"Do not use for heroes with media content below"
|
|
],
|
|
"editRules": {
|
|
"textOnly": true,
|
|
"layoutLocked": true,
|
|
"styleLocked": true
|
|
}
|
|
}
|