{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "pricing-flow", "type": "registry:ui", "title": "Pricing Flow", "description": "An interactive pricing flow with billing toggles and plan selection.", "dependencies": [ "motion", "lucide-react" ], "registryDependencies": [ "button", "card" ], "files": [ { "path": "registry/ruixenui/pricing-flow.tsx", "content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport { AnimatePresence, motion } from \"motion/react\";\nimport { CheckIcon } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { Button } from \"@/components/ui/button\";\n\ntype PlanType = \"monthly\" | \"annually\";\n\nexport interface PLAN {\n id: string;\n title: string;\n desc: string;\n monthlyPrice: number;\n annuallyPrice: number;\n badge?: string;\n buttonText: string;\n features: string[];\n link: string;\n}\n\ninterface PricingFlowProps {\n plans?: PLAN[];\n defaultBillPlan?: PlanType;\n}\n\nexport const DEFAULT_PLANS: PLAN[] = [\n {\n id: \"starter\",\n title: \"Starter\",\n desc: \"Ideal for developers and indie hackers building with Ruixen UI for personal or small commercial projects.\",\n monthlyPrice: 29,\n annuallyPrice: 306,\n buttonText: \"Get Starter Access\",\n features: [\n \"Access to 50+ UI components\",\n \"Tailwind-compatible styling\",\n \"Basic theming support\",\n \"Starter templates (blog, dashboard)\",\n \"1 project license\",\n \"Community support\",\n \"Early access to updates\",\n ],\n link: \"#\",\n },\n {\n id: \"pro\",\n title: \"Pro\",\n desc: \"Designed for teams and startups who need advanced UI components, theme customization, and premium support.\",\n monthlyPrice: 79,\n annuallyPrice: 834,\n badge: \"Best Value\",\n buttonText: \"Upgrade to Pro\",\n features: [\n \"Access to 100+ production-grade components\",\n \"Advanced theming & dark mode\",\n \"Code snippets & layout presets\",\n \"Figma design system access\",\n \"Commercial use for up to 10 projects\",\n \"Priority GitHub issue support\",\n \"Team collaboration tools\",\n ],\n link: \"#\",\n },\n];\n\nexport default function PricingFlow({\n plans = DEFAULT_PLANS,\n defaultBillPlan = \"monthly\",\n}: PricingFlowProps) {\n const [billPlan, setBillPlan] = useState(defaultBillPlan);\n\n const handleSwitch = () => {\n setBillPlan((prev) => (prev === \"monthly\" ? \"annually\" : \"monthly\"));\n };\n\n return (\n
\n {/* Header */}\n
\n

Pricing

\n

\n Streamline your creative process with AI. Generate, manage, and\n publish content — all in one place.\n

\n\n {/* Billing Toggle */}\n
\n Monthly\n \n
\n \n \n Annually\n
\n
\n\n {/* Plans Grid */}\n
\n {plans.map((plan) => (\n \n ))}\n
\n
\n );\n}\n\nconst PlanCard = ({ plan, billPlan }: { plan: PLAN; billPlan: PlanType }) => {\n const price = billPlan === \"monthly\" ? plan.monthlyPrice : plan.annuallyPrice;\n const suffix = billPlan === \"monthly\" ? \"/mo\" : \"/yr\";\n\n return (\n \n {/* Badge Glow */}\n {plan.badge && (\n
\n )}\n\n {/* Header */}\n
\n

{plan.title}

\n

\n \n \n ${price}\n {suffix}\n \n \n

\n

\n {plan.desc}\n

\n
\n\n {/* Button & Billing */}\n
\n \n
\n \n \n {billPlan === \"monthly\" ? \"Billed monthly\" : \"Billed annually\"}\n \n \n
\n
\n\n {/* Features */}\n
\n Includes:\n {plan.features.map((feature, idx) => (\n
\n \n {feature}\n
\n ))}\n
\n \n );\n};\n", "type": "registry:ui", "target": "components/ruixen/pricing-flow.tsx" } ] }