BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/paddle/pricing-display

Pricing display

paddle/pricing-display
FreeBlock

Pricing section with localized prices, billing interval toggle, and built-in overlay checkout. Supports current-plan highlighting and plan change selection flows via currentPriceIds and selectedPriceId props.

Install it

npx shadcn@latest add https://developer.paddle.com/r/pricing-display.json

Source

registry/new-york/blocks/pricing-display/components/pricing-display.tsxdeveloper.paddle.com/r/pricing-display.json · first 6 KB
1"use client"
2
3import * as React from "react"
4import { PricingTierCard } from "@/registry/new-york/blocks/pricing-cards/components/pricing-tier-card"
5import { PricingTierCardGroup } from "@/registry/new-york/blocks/pricing-cards/components/pricing-tier-card-group"
6import { usePaddlePrices } from "@/registry/new-york/blocks/paddle-client/lib/hooks/use-paddle-prices"
7import {
8 getOrCreatePaddle,
9 addPaddleEventListener,
10} from "@/registry/new-york/blocks/paddle-client/lib/paddle-instance"
11import { BillingIntervalToggle } from "@/registry/new-york/blocks/billing-interval-toggle/components/billing-interval-toggle"
12import { cn } from "@/lib/utils"
13import { formatIntervalLabel } from "@/registry/new-york/blocks/paddle-helpers/lib/paddle-format"
14import type {
15 Environments,
16 CheckoutEventsData,
17 PaddleEventData,
18 TimePeriod,
19} from "@/registry/new-york/blocks/paddle-client/lib/paddle-sdk-types"
20import type { CheckoutCompleteData } from "@/registry/new-york/blocks/paddle-helpers/lib/paddle-types"
21
22// Local alias for the interval string union from Paddle's TimePeriod.
23// Uses the SDK's source of truth directly rather than a duplicated type.
24type Interval = TimePeriod["interval"]
25
26/** Plan configuration for the `PricingDisplay` component. */
27export type PricingDisplayPlan = {
28 priceId?: string | Partial<Record<Interval, string>>
29 name: string
30 description?: string
31 features?: string[]
32 badge?: string
33 badgePosition?: "left" | "center" | "right"
34 icon?: React.ReactNode
35 ctaLabel?: string
36 onSelect?: () => void
37}
38
39/** Props for the `PricingDisplay` component. */
40export type PricingDisplayProps = {
41 plans: PricingDisplayPlan[]
42 clientToken: string
43 environment?: Environments
44 countryCode?: string
45 discountId?: string
46 showOriginalPrice?: boolean
47 currentPriceIds?: string[]
48 selectedPriceId?: string
49 onPlanSelect?: (priceId: string) => void
50 onCheckoutComplete?: (data: CheckoutCompleteData) => void
51 className?: string
52}
53
54const INTERVAL_ORDER: Interval[] = ["day", "week", "month", "year"]
55
56function getAllPriceIds(plans: PricingDisplayPlan[]): string[] {
57 return plans.flatMap((plan) => {
58 if (!plan.priceId) return []
59 if (typeof plan.priceId === "string") return [plan.priceId]
60 return Object.values(plan.priceId).filter(Boolean) as string[]
61 })
62}
63
64function getIntervals(plans: PricingDisplayPlan[]): Interval[] {
65 const multiIntervalPlans = plans.filter(
66 (p) => p.priceId !== undefined && typeof p.priceId !== "string"
67 )
68// … truncated

What it pulls in

Other registry items

  • @paddle/paddle-client
  • @paddle/paddle-helpers
  • @paddle/pricing-cards
  • @paddle/billing-interval-toggle

Files it writes

  • registry/new-york/blocks/pricing-display/components/pricing-display.tsx

Facts

Registry
paddle
Type
registry:block
Access
Free
Files written
1
Licence
Apache-2.0
First indexed
2026-08-01
Last confirmed
today

Go to the source

developer.paddle.com PaddleHQ/paddle-ui on GitHub Raw registry item This item as JSON

More from paddle

All 14 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Express checkoutexpress-checkoutpaddleBlocksFree1 dep · 3 files
Inline checkoutinline-checkoutpaddleBlocksFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex