72 lines
2.7 KiB
JSON
72 lines
2.7 KiB
JSON
{
|
|
"name": "FaqBase",
|
|
"description": "FAQ section with accordion items and optional header.",
|
|
"constraints": {
|
|
"textRules": {
|
|
"title": {
|
|
"required": true,
|
|
"example": "Frequently Asked Questions",
|
|
"minChars": 2,
|
|
"maxChars": 50
|
|
},
|
|
"description": {
|
|
"required": true,
|
|
"example": "Find answers to common questions about our products and services",
|
|
"minChars": 5,
|
|
"maxChars": 250
|
|
},
|
|
"tag": {
|
|
"required": false,
|
|
"example": "Help",
|
|
"minChars": 2,
|
|
"maxChars": 30
|
|
}
|
|
},
|
|
"faqRules": {
|
|
"faqs": {
|
|
"required": true,
|
|
"minItems": 1,
|
|
"example": "[{\"id\": \"1\", \"title\": \"What is your return policy?\", \"content\": \"We offer a 30-day money-back guarantee.\"}]",
|
|
"note": "Array of FAQ items. Each item requires unique id, title (question), and content (answer with HTML support)."
|
|
},
|
|
"animationType": {
|
|
"required": false,
|
|
"default": "smooth",
|
|
"options": [
|
|
"smooth",
|
|
"instant"
|
|
],
|
|
"note": "Animation type for accordion open/close. 'smooth' uses height transition, 'instant' shows/hides immediately."
|
|
}
|
|
}
|
|
},
|
|
"propsSchema": {
|
|
"faqs": "Array<{ id: string, title: string, content: string }> - FAQ items",
|
|
"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}>",
|
|
"textboxLayout": "'default' | 'split' | 'split-actions' | 'split-description' | 'inline-image' (required - 'inline-image' uses titleSegments for rich text with images)",
|
|
"useInvertedBackground": "'noInvert' | 'invertDefault'",
|
|
"animationType?": "'smooth' | 'instant' (default: 'smooth')",
|
|
"showCard?": "boolean (default: true)",
|
|
"ariaLabel?": "string (default: 'FAQ section')",
|
|
"className?": "string"
|
|
},
|
|
"usageExample": "<FaqBase faqs={[{id: '1', title: 'What is your return policy?', content: 'We offer a 30-day money-back guarantee on all our products.'}, {id: '2', title: 'How long does shipping take?', content: 'Standard shipping typically takes 5-7 business days.'}]} title=\"Frequently Asked Questions\" description=\"Find answers to common questions\" textboxLayout=\"default\" useInvertedBackground={\"noInvert\"} />",
|
|
"do": [
|
|
"Use for help pages",
|
|
"Use for support sections",
|
|
"Requires faqs[]",
|
|
"Requires titleSegments?[]",
|
|
"Requires buttons?[]"
|
|
],
|
|
"dont": [],
|
|
"editRules": {
|
|
"textOnly": true,
|
|
"layoutLocked": true,
|
|
"styleLocked": true
|
|
}
|
|
} |