57 lines
2.6 KiB
JSON
57 lines
2.6 KiB
JSON
{
|
|
"name": "ContactSplitForm",
|
|
"description": "Split layout contact form with animated title and description, dynamic input fields, optional textarea, submit button, and media content.",
|
|
"constraints": {
|
|
"textRules": {
|
|
"title": {
|
|
"required": true,
|
|
"example": "Medium length heading goes here",
|
|
"minChars": 4,
|
|
"maxChars": 50
|
|
},
|
|
"description": {
|
|
"required": true,
|
|
"example": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.",
|
|
"minChars": 20,
|
|
"maxChars": 200
|
|
},
|
|
"buttonText": {
|
|
"required": false,
|
|
"default": "Submit",
|
|
"example": "Send Message",
|
|
"minChars": 2,
|
|
"maxChars": 15
|
|
}
|
|
}
|
|
},
|
|
"propsSchema": {
|
|
"title": "string",
|
|
"description": "string",
|
|
"inputs": "Array<{ name: string, type: string, placeholder: string, required?: boolean, className?: string }> - Form input fields (min 2 required)",
|
|
"textarea?": "{ name: string, placeholder: string, rows?: number, required?: boolean, className?: string } - Optional textarea field",
|
|
"useInvertedBackground": "'noInvert' | 'invertDefault'",
|
|
"imageSrc?": "string",
|
|
"videoSrc?": "string",
|
|
"imageAlt?": "string (default: '')",
|
|
"videoAriaLabel?": "string (default: 'Contact section video')",
|
|
"mediaPosition?": "'left' | 'right' (default: 'right')",
|
|
"buttonText?": "string (default: 'Submit')",
|
|
"onSubmit?": "(data: Record<string, string>) => void",
|
|
"ariaLabel?": "string (default: 'Contact section')",
|
|
"className?": "string"
|
|
},
|
|
"usageExample": "// Wrap in ThemeProvider\n<ThemeProvider defaultButtonVariant=\"text-stagger\" defaultTextAnimation=\"entrance-slide\" borderRadius=\"rounded\" background=\"aurora\" cardStyle=\"glass-elevated\" primaryButtonStyle=\"gradient\" secondaryButtonStyle=\"glass\">\n <ContactSplitForm title=\"Get in touch\" description=\"We'd love to hear from you. Send us a message.\" inputs={[{ name: 'name', type: 'text', placeholder: 'Name', required: true }, { name: 'email', type: 'email', placeholder: 'Email', required: true }]} textarea={{ name: 'message', placeholder: 'Type your message...', rows: 5, required: true }} useInvertedBackground={\"noInvert\"} imageSrc=\"/placeholders/placeholder-16-9.svg\" onSubmit={(data) => console.log(data)} />\n</ThemeProvider>",
|
|
"do": [
|
|
"Use for feature showcases",
|
|
"Use for capability displays",
|
|
"Use for contact pages",
|
|
"Use for lead generation",
|
|
"Requires inputs[]"
|
|
],
|
|
"dont": [],
|
|
"editRules": {
|
|
"textOnly": true,
|
|
"layoutLocked": true,
|
|
"styleLocked": true
|
|
}
|
|
} |