{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "wizard-form-shadcnui", "type": "registry:component", "title": "Wizard Form", "description": "Multi-step wizard form with animated transitions, validation, and progress tracking", "dependencies": [ "framer-motion", "react" ], "files": [ { "path": "@uitripled/react-shadcn/src/components/forms/wizard-form.tsx", "content": "\"use client\";\n\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { cn } from \"@/lib/utils\";\nimport { motion, type Variants } from \"framer-motion\";\nimport {\n ArrowLeft,\n ArrowRight,\n Check,\n FileCheck,\n MapPin,\n Settings,\n User,\n} from \"lucide-react\";\nimport { useState } from \"react\";\n\n// ============================================================================\n// ANIMATION VARIANTS\n// ============================================================================\n\nconst containerVariants: Variants = {\n hidden: { opacity: 0, scale: 0.95 },\n visible: {\n opacity: 1,\n scale: 1,\n transition: {\n duration: 0.5,\n ease: \"easeOut\",\n staggerChildren: 0.1,\n },\n },\n};\n\nconst contentVariants: Variants = {\n hidden: { opacity: 0, x: 20 },\n visible: {\n opacity: 1,\n x: 0,\n transition: { duration: 0.4, ease: \"easeOut\" },\n },\n};\n\n// ============================================================================\n// DATA\n// ============================================================================\n\nconst STEPS = [\n { id: 1, name: \"Personal Info\", description: \"Basic details\", icon: User },\n { id: 2, name: \"Address\", description: \"Location info\", icon: MapPin },\n { id: 3, name: \"Preferences\", description: \"Customization\", icon: Settings },\n { id: 4, name: \"Review\", description: \"Final check\", icon: FileCheck },\n];\n\n// ============================================================================\n// COMPONENTS\n// ============================================================================\n\nfunction SidebarStep({\n step,\n currentStep,\n}: {\n step: (typeof STEPS)[0];\n currentStep: number;\n}) {\n const Icon = step.icon;\n const isCompleted = currentStep > step.id;\n const isCurrent = currentStep === step.id;\n\n return (\n
\n {/* Vertical Line */}\n {step.id !== STEPS.length && (\n
\n \n
\n )}\n\n {/* Icon Bubble */}\n \n {isCompleted ? (\n \n ) : (\n \n )}\n \n\n {/* Text Info */}\n
\n \n {step.name}\n \n \n {step.description}\n \n
\n
\n );\n}\n\nfunction InputField({\n label,\n placeholder,\n type = \"text\",\n}: {\n label: string;\n placeholder: string;\n type?: string;\n}) {\n return (\n
\n \n {label} *\n \n \n
\n );\n}\n\nfunction ReviewItem({ label, value }: { label: string; value: string }) {\n return (\n
\n
{label}
\n
{value}
\n
\n );\n}\n\n// ============================================================================\n// MAIN COMPONENT\n// ============================================================================\n\nexport function WizardForm() {\n const [currentStep, setCurrentStep] = useState(1);\n\n const handleNext = () => {\n if (currentStep < STEPS.length) {\n setCurrentStep(currentStep + 1);\n }\n };\n\n const handleBack = () => {\n if (currentStep > 1) {\n setCurrentStep(currentStep - 1);\n }\n };\n\n return (\n
\n
\n {/* Header Section */}\n
\n \n \n Wizard Form\n \n

\n Account Setup\n

\n

\n Complete the steps below to verify your profile\n

\n
\n\n {/* Main Card Container */}\n \n {/* Glass Gradient Overlay */}\n
\n\n
\n {/* Left Sidebar - Steps */}\n
\n
\n {STEPS.map((step) => (\n \n ))}\n
\n
\n\n {/* Right Content Area */}\n
\n
\n \n {/* Step Header */}\n
\n

\n {STEPS[currentStep - 1].name}\n

\n

\n {STEPS[currentStep - 1].description}\n

\n
\n\n {/* Form Content */}\n
\n {currentStep === 1 && (\n
\n \n \n \n \n
\n )}\n\n {currentStep === 2 && (\n
\n \n
\n \n \n \n
\n
\n )}\n\n {currentStep === 3 && (\n
\n
\n \n
\n {[\"Email\", \"SMS\", \"Both\"].map((option) => (\n \n \n \n {option}\n \n \n ))}\n
\n
\n\n
\n \n
\n {[\"Auto\", \"Light\", \"Dark\"].map((option) => (\n \n \n \n {option}\n \n \n ))}\n
\n
\n
\n )}\n\n {currentStep === 4 && (\n
\n
\n

\n Personal Information\n

\n
\n \n \n \n
\n
\n\n
\n

\n Address Details\n

\n
\n \n \n
\n
\n
\n )}\n
\n \n
\n\n {/* Footer / Navigation */}\n
\n \n \n Back\n \n \n {currentStep === STEPS.length ? (\n <>\n Submit\n \n \n ) : (\n <>\n Next Step\n \n \n )}\n \n
\n
\n
\n \n
\n
\n );\n}\n", "type": "registry:component", "target": "components/uitripled/wizard-form-shadcnui.tsx" } ] }