From 889fae08b78900c7c22bc18135cce4741372e5ca Mon Sep 17 00:00:00 2001 From: bender Date: Fri, 17 Apr 2026 21:18:58 +0000 Subject: [PATCH] Switch to version 2: added registry/components/TextBox.json --- registry/components/TextBox.json | 66 ++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 registry/components/TextBox.json diff --git a/registry/components/TextBox.json b/registry/components/TextBox.json new file mode 100644 index 0000000..84025c5 --- /dev/null +++ b/registry/components/TextBox.json @@ -0,0 +1,66 @@ +{ + "name": "TextBox", + "description": "Flexible text composition component with animated title and description.", + "details": "Use for text content blocks with optional tag and up to 2 CTAs. Supports default (centered), split (tag + title + description left, buttons right), split-actions (tag + title left, buttons only right), or split-description (tag + title left, description only right). Text animations use ThemeProvider defaults.", + "constraints": { + "textRules": { + "title": { + "required": true, + "example": "Welcome to Our Platform", + "minChars": 2, + "maxChars": 100 + }, + "description": { + "required": true, + "example": "Discover amazing features and capabilities", + "minChars": 5, + "maxChars": 500 + }, + "tag": { + "required": false, + "example": "New", + "minChars": 2, + "maxChars": 30 + } + } + }, + "propsSchema": { + "title": "string", + "description": "string", + "type?": "'entrance-slide' | 'reveal-blur' | 'background-highlight'", + "textboxLayout": "'default' | 'split' | 'split-actions' | 'split-description' (required)", + "center?": "boolean (default: false)", + "tag?": "string", + "tagIcon?": "LucideIcon", + "tagAnimation?": "'none' | 'opacity' | 'slide-up' | 'blur-reveal'", + "buttons?": "Array<{text: string, onClick?: () => void, href?: string}>", + "buttonAnimation?": "'none' | 'opacity' | 'slide-up' | 'blur-reveal'", + "duration?": "number (default: 1)", + "start?": "string (default: 'top 80%')", + "end?": "string (default: 'top 20%')", + "gradientColors?": "{ from: string, to: string }", + "children?": "React.ReactNode", + "className?": "string", + "titleClassName?": "string", + "descriptionClassName?": "string", + "tagClassName?": "string", + "buttonContainerClassName?": "string", + "buttonClassName?": "string", + "buttonTextClassName?": "string", + "avatars?": "Array<{ src: string, alt?: string }> - User avatar images", + "avatarText?": "string", + "avatarGroupClassName?": "string" + }, + "usageExample": "", + "do": [ + "Use for general use", + "Requires buttons?[]", + "Requires avatars?[]" + ], + "dont": [], + "editRules": { + "textOnly": true, + "layoutLocked": true, + "styleLocked": true + } +}