{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "pricing-with-user-scaling", "type": "registry:ui", "title": "Pricing with User Scaling", "description": "A pricing component with user-based scaling and dynamic pricing calculations.", "dependencies": [ "motion", "lucide-react", "clsx" ], "registryDependencies": [ "button", "card", "slider" ], "files": [ { "path": "registry/ruixenui/pricing-with-user-scaling.tsx", "content": "\"use client\";\n\nimport { useState } from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport { CheckIcon, Minus, Plus } from \"lucide-react\";\nimport { AnimatePresence, motion } from \"motion/react\";\nimport cn from \"clsx\";\n\nexport interface Plan {\n title: string;\n monthlyPrice: number;\n annuallyPrice: number;\n desc: string;\n features: string[];\n buttonText: string;\n}\n\ninterface PricingWithUserScalingProps {\n plans?: Plan[];\n defaultBilling?: \"monthly\" | \"annual\";\n defaultUsers?: number;\n}\n\nexport const DEFAULT_PLANS: Plan[] = [\n {\n title: \"Free\",\n monthlyPrice: 0,\n annuallyPrice: 0,\n desc: \"Perfect to start with personal usage\",\n features: [\n \"20 volts per month\",\n \"Roll over volts\",\n \"Personal use license\",\n \"Public generations\",\n \"Plugins for Figma, Framer, Webflow\",\n ],\n buttonText: \"Get Started\",\n },\n {\n title: \"Basic\",\n monthlyPrice: 8,\n annuallyPrice: Math.round(8 * 12 * 0.8),\n desc: \"For growing teams\",\n features: [\n \"Roll over volts\",\n \"Royalty free commercial license\",\n \"Public generations\",\n \"Plugins for Figma, Framer, Webflow\",\n ],\n buttonText: \"Get Started\",\n },\n {\n title: \"Standard\",\n monthlyPrice: 16,\n annuallyPrice: Math.round(16 * 12 * 0.8),\n desc: \"For professional creators\",\n features: [\n \"Roll over volts\",\n \"Royalty free commercial license\",\n \"Public generations\",\n \"Plugins for Figma, Framer, Webflow\",\n ],\n buttonText: \"Get Started\",\n },\n {\n title: \"Pro\",\n monthlyPrice: 32,\n annuallyPrice: Math.round(32 * 12 * 0.8),\n desc: \"Advanced tools for teams\",\n features: [\n \"Roll over volts\",\n \"Royalty free commercial license\",\n \"Private generations\",\n \"Plugins for Figma, Framer, Webflow\",\n ],\n buttonText: \"Get Started\",\n },\n {\n title: \"Mastermind\",\n monthlyPrice: 64,\n annuallyPrice: Math.round(64 * 12 * 0.8),\n desc: \"All-in-one for enterprises\",\n features: [\n \"Roll over volts\",\n \"Royalty free commercial license\",\n \"Private generations\",\n \"Plugins for Figma, Framer, Webflow\",\n ],\n buttonText: \"Get Started\",\n },\n];\n\nconst PlanCard = ({\n plan,\n billing,\n users,\n}: {\n plan: Plan;\n billing: \"monthly\" | \"annual\";\n users: number;\n}) => {\n const price = billing === \"annual\" ? plan.annuallyPrice : plan.monthlyPrice;\n\n return (\n
\n {plan.desc}\n
\n