Pricing Section One
navdeep-singh/pricing-section-oneFreeBlock
A responsive three-tier pricing section with a monthly and yearly billing switcher.
Install it
npx shadcn@latest add https://ui.navdeepsingh.dev/r/pricing-section-one.jsonSource
1'use client'23import type { ComponentPropsWithoutRef } from 'react'4import { useState } from 'react'5import { Check } from 'lucide-react'67import { AnimatedNumber } from '@/components/ui/components/animated-numbers'8import { Badge } from '@/components/ui/badge'9import { Button } from '@/components/ui/button'10import {11 Card,12 CardContent,13 CardDescription,14 CardFooter,15 CardHeader,16 CardTitle,17} from '@/components/ui/card'18import { cn } from '@/lib/utils'1920export type PricingInterval = 'monthly' | 'yearly'2122export type PricingValue = number | string2324// Defines the content and configuration for each pricing plan.25export type PricingPlan = {26 id: string27 name: string28 description: string29 monthlyPrice: PricingValue30 yearlyPrice: PricingValue31 features: readonly string[]32 ctaLabel: string33 ctaHref: string34 prefix?: string35 priceSuffix?: string36 featured?: boolean37 badge?: string38}3940// Controls the section heading content.41export type PricingSectionCopy = {42 eyebrow?: string43 heading: string44 description: string45}4647// Controls the billing toggle labels.48export type PricingBillingCopy = {49 ariaLabel: string50 monthlyLabel: string51 yearlyLabel: string52 yearlyNote: string53}5455export type PricingSectionOneProps = ComponentPropsWithoutRef<'section'> & {56 plans?: readonly PricingPlan[]57 defaultInterval?: PricingInterval58 copy?: Partial<PricingSectionCopy>59 billing?: Partial<PricingBillingCopy>60}6162// Default section content.63const defaultCopy: PricingSectionCopy = {64 heading: 'Simple pricing for every stage',65 description:66 'Start for free, upgrade when you need more, or contact us for a plan tailored to your organization.',67}6869// Default billing toggle content.70const defaultBilling: PricingBillingCopy = {71 ariaLabel: 'Choose billing interval',72 monthlyLabel: 'Monthly',73 yearlyLabel: 'Yearly',74 yearlyNote: 'Save 20%',75}7677// Default pricing plans used when no custom plans are provided.78const defaultPlans: readonly PricingPlan[] = [79 {80 id: 'free',81 name: 'Free',82 description: 'For individuals getting started with the essential tools.',83 prefix: '$',84 monthlyPrice: 0,85 yearlyPrice: 0,86 priceSuffix: '/ month',87 features: ['1 workspace', 'Up to 3 projects', 'Basic analytics', 'Community support'],88 ctaLabel: 'Start free',89 ctaHref: '#get-started',90 },91 {92 id: 'pro',93 name: 'Pro',94 description: 'For professionals and growing teams that need more power and flexibility.',95 prefix: '$',96// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from navdeep-singh
All 64 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Blog Section Oneblog-section-one | navdeep-singh | Blocks | Free | 1 dep | |
| Contact Section Fourcontact-section-four | navdeep-singh | Blocks | Free | no deps | |
| Contact Section Onecontact-section-one | navdeep-singh | Blocks | Free | 1 dep | |
| Contact Section Threecontact-section-three | navdeep-singh | Blocks | Free | no deps | |
| Contact Section Twocontact-section-two | navdeep-singh | Blocks | Free | no deps | |
| Content Section Fourcontent-section-four | navdeep-singh | Blocks | Free | 1 dep | |
| Content Section Onecontent-section-one | navdeep-singh | Blocks | Free | 1 dep | |
| Content Section Threecontent-section-three | navdeep-singh | Blocks | Free | 2 deps |
