Files
cba07ff0-38bb-404e-9e21-d16…/registry/components/HeroBillboard.json
2026-02-09 17:03:14 +00:00

86 lines
3.7 KiB
JSON

{
"name": "HeroBillboard",
"description": "Full-width hero section with centered text content, optional tag, buttons, and single image/video below in a card frame.",
"constraints": {
"textRules": {
"title": {
"required": true,
"example": "Welcome to Our Platform",
"minChars": 2,
"maxChars": 40
},
"description": {
"required": true,
"example": "Create beautiful, responsive web experiences",
"minChars": 5,
"maxChars": 200
},
"tag": {
"required": false,
"example": "New Release",
"minChars": 2,
"maxChars": 30
}
},
"mediaRules": {
"imageSrc": {
"required": false,
"example": "/hero-image.jpg",
"note": "Supports external URLs with unoptimized prop"
},
"videoSrc": {
"required": false,
"example": "/hero-video.mp4",
"note": "Takes precedence over imageSrc if both provided"
},
"imageAlt": {
"required": false,
"example": "Hero background",
"note": "Empty string marks image as decorative (aria-hidden)"
}
},
"buttonRules": {
"maxButtons": 2,
"structure": {
"text": "string - Button label (required)",
"href": "string - Link destination (optional). External URLs (https://, http://, www.) open in new tab. Internal values (e.g., 'about', 'contact') scroll to #about, #contact sections",
"onClick": "() => void - Additional click handler (optional)",
"props": "Partial<ButtonPropsForVariant> - Additional button props like className, textClassName (optional)"
},
"examples": [
"{ text: 'Get Started', href: 'https://example.com' }",
"{ text: 'Learn More', href: 'about' }"
],
"note": "Button variant is controlled by ThemeProvider's defaultButtonVariant. Border radius is controlled by ThemeProvider's borderRadius (options: 'sharp', 'rounded', 'soft', 'pill'). All sections should be wrapped in a single ThemeProvider at the app/page level to maintain consistent styling across the entire site."
}
},
"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' } (required)",
"tag?": "string",
"tagIcon?": "LucideIcon",
"buttons?": "Array<{text: string, onClick?: () => void, href?: string}>",
"imageSrc?": "string",
"videoSrc?": "string",
"imageAlt?": "string (default: '')",
"videoAriaLabel?": "string (default: 'Hero video')",
"ariaLabel?": "string (default: 'Hero section')",
"className?": "string"
},
"usageExample": "<ThemeProvider defaultButtonVariant=\"text-stagger\" defaultTextAnimation=\"entrance-slide\" borderRadius=\"rounded\">\n <HeroBillboard \n title=\"Welcome to Our Platform\" \n description=\"Create beautiful, responsive web experiences\" \n tag=\"New Release\" \n imageSrc=\"/hero.jpg\" \n imageAlt=\"Hero banner\"\n buttons={[{ text: 'Get Started', href: 'https://example.com' }, { text: 'Learn More', href: 'about' }]} \n />\n</ThemeProvider>",
"do": [
"Use for landing pages",
"Use for feature showcases",
"Use for capability displays",
"Requires buttons?[]"
],
"dont": [
"Do not use multiple items"
],
"editRules": {
"textOnly": true,
"layoutLocked": true,
"styleLocked": true
}
}