{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "pricing-toggle", "title": "Pricing Toggle", "description": "Monthly/annual toggle with animated price swap using Framer Motion", "dependencies": [ "motion" ], "files": [ { "path": "registry/pioneerui/pricing-toggle.tsx", "content": "\"use client\"\n\nimport React, { useState } from \"react\"\nimport { motion, AnimatePresence } from \"motion/react\"\nimport { cn } from \"@/lib/utils\"\n\nexport interface PricingToggleProps {\n monthlyLabel?: string\n annualLabel?: string\n discount?: string\n onChange?: (isAnnual: boolean) => void\n defaultAnnual?: boolean\n className?: string\n}\n\nexport function PricingToggle({\n monthlyLabel = \"Monthly\",\n annualLabel = \"Annual\",\n discount = \"Save 20%\",\n onChange,\n defaultAnnual = false,\n className,\n}: PricingToggleProps) {\n const [isAnnual, setIsAnnual] = useState(defaultAnnual)\n\n const toggle = (annual: boolean) => {\n setIsAnnual(annual)\n onChange?.(annual)\n }\n\n return (\n