Files
0b1f4792-64cd-483a-8739-3d5…/registry/components/FeatureCardTwentyOne.json
2026-02-09 13:54:49 +02:00

86 lines
3.1 KiB
JSON

{
"name": "FeatureCardTwentyOne",
"description": "Split layout with media on one side and TextBox with accordion items on the other.",
"constraints": {
"textRules": {
"title": {
"required": true,
"example": "Custom designs",
"minChars": 2,
"maxChars": 60
},
"description": {
"required": true,
"example": "Explore our range of customizable solutions designed to meet your unique needs.",
"minChars": 10,
"maxChars": 300
},
"tag": {
"required": false,
"example": "Features",
"minChars": 2,
"maxChars": 30
}
},
"accordionRules": {
"id": {
"required": true,
"example": "1",
"note": "Unique identifier for each accordion item"
},
"title": {
"required": true,
"example": "Inspiration + innovation",
"minChars": 2,
"maxChars": 60,
"note": "Accordion header text"
},
"content": {
"required": true,
"example": "From custom colourways to bespoke elements built from the ground up.",
"minChars": 10,
"maxChars": 500,
"note": "Accordion expanded content (supports HTML)"
}
},
"itemRules": {
"minItems": 2,
"maxItems": 6,
"recommendedItems": 3
}
},
"propsSchema": {
"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}>",
"accordionItems": "Array<{ id: string, title: string, content: string }>",
"imageSrc?": "string (either imageSrc or videoSrc required)",
"imageAlt?": "string",
"videoSrc?": "string (either imageSrc or videoSrc required)",
"videoAriaLabel?": "string",
"useInvertedBackground": "'noInvert' | 'invertDefault'",
"mediaPosition?": "'left' | 'right' (default: 'left')",
"ariaLabel?": "string (default: 'Feature section')",
"className?": "string"
},
"usageExample": "<FeatureCardTwentyOne title=\"Custom designs\" description=\"Explore our range of customizable solutions.\" tag=\"Features\" imageSrc=\"/images/feature.webp\" imageAlt=\"Feature showcase\" accordionItems={[{ id: '1', title: 'Inspiration + innovation', content: 'Collaborate with us on custom designs.' }, { id: '2', title: 'Sustainability + us', content: 'Committed to sustainable practices.' }, { id: '3', title: 'Request samples', content: 'Get in touch for samples and pricing.' }]} buttons={[{ text: 'Learn more', href: '#' }]} useInvertedBackground=\"noInvert\" mediaPosition=\"left\" />",
"do": [
"Use for feature showcases",
"Use for capability displays",
"Requires titleSegments?[]",
"Requires buttons?[]",
"Requires accordionItems[]"
],
"dont": [
"Do not use less than 2 items",
"Do not use more than 6 items"
],
"editRules": {
"textOnly": true,
"layoutLocked": true,
"styleLocked": true
}
}