Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Pay-What-You-Can Nonprofit Pricing Block for React

A sliding scale for nonprofits: a price slider from free to the list price, the chosen price riding its thumb, shortcuts to the minimum, suggested and supporter prices, and a line on what that price funds.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Let nonprofits choose what they pay with this sliding-scale pricing section. A one-line header says the product is free for any nonprofit that can't pay and names the list price. Below it, a card in a card. One panel holds a Slider from $0 to the $30 list price, with the chosen price riding its thumb in large type and rolling to each new amount with Sliding Number. Under the track, three shortcut buttons jump to the Minimum ($0), Suggested ($12) and Supporter ($24) prices, and a sentence at the panel's foot says what that price funds, from "supporters cover your seat" to "a free seat for another nonprofit". The other panel opens with a Shine Button that names the price ("Start at $12 a seat", or "Start for free" at $0), the block's only colored element, over what every seat includes. The slider, the riding price and the shortcuts sit on the page's rails under the top rule drawn by Guides. Built with Frame, Slider, Sliding Number, Button, Shine Button, Guides and Lucide icons, with CSS transitions only. For nonprofit programs, community tools, open-access products and any pricing that asks people to pay what they can.

FAQ

How do I change the prices on the scale?

Edit the constants at the top of the file. LIST_PRICE is the top of the slider and the price in the header, SUGGESTED is where the slider starts, and STOPS lists the marked prices with their names; each one becomes a shortcut under the track at its place on the scale. Everything that shows a price, the riding number, the shortcuts, the call to action and what a screen reader hears, is computed from these, so they can't disagree.

How do I change what each price says it funds?

fundsFor returns the sentence at the foot of the slider panel for a price: free, below the suggested price, at it, between it and the supporter price, above that, and at the list price. Change the sentences or the thresholds there; the panel keeps room for two lines, so a longer sentence doesn't move the layout.

How do I send the chosen price to checkout?

The call to action is a real link. It's a ShineButton with render set to an a element and nativeButton={false}. Build its href from price, for example /signup?seat_price=12, and create the subscription at that price on your server. A price of $0 says "Start for free", so you can send those sign-ups to a plan with no payment step.

Is the sliding scale accessible?

Yes. The slider is named "Your price per seat" and reads its value in words, "$12 per seat a month, suggested", and it moves with the arrow keys, Page Up and Page Down, Home and End. The shortcuts are buttons named for their price ("Supporter, $24 per seat a month"). Once a drag or a key press ends, a polite live region says the new price and what it funds, so a screen reader hears it once rather than at every step. The large riding number repeats the slider's value, so it's hidden from assistive technology.

How does it look on a phone?

The two panels stack, the slider first, and the call to action still lands on the first screen and a half of an iPhone. The riding price never leaves the panel: it's pulled back by its own position, so at $0 it starts at the track's start and at the list price it ends at the track's end. The three shortcut labels fit side by side at 320 pixels. In right-to-left pages the scale and the riding price mirror, and the prices stay left to right.

Why a sliding scale instead of a fixed nonprofit discount?

A fixed discount asks every nonprofit to prove its status and still pay the same reduced price, which shuts out the smallest groups. A sliding scale lets them pay nothing, while organizations that can afford more cover their own seat or someone else's, and saying what each price funds is what makes people choose the higher ones. Keep a suggested price close to what a seat costs you, so the default is fair to both sides.

  • Pro

    Education pricing behind a school email: type an address, press Verify and the price rolls from the list price to the education price while the plans unlock; anything else gets a line of guidance.

  • Pro

    Open Source Pricing

    Discounts and offers

    A free CI plan for open-source projects: one raised card with a display-size $0, the minutes it includes, an apply button and what's included (five items on a phone), beside three numbered eligibility rules.

  • Pro

    A seat calculator: a slider sets the team size with its count riding the thumb, ticks at the 10, 25 and 50 seat discounts, shortcuts to them, and a panel that rolls the seat price and monthly total.

  • Pro

    A split pricing section for a VPN with a contract length slider from 1 to 24 months in a card in a card, where the monthly price at display size, the discount, total and savings roll to each term, and a sticky bar on phones.

  • Pro

    Startup Credits Pricing

    Discounts and offers

    Startup credits with the amount as the hero: $25,000 at display size, three facts, three eligibility statements the visitor ticks and an apply button that turns on only when all are true.

  • Pro

    Referral Rewards Pricing

    Discounts and offers

    Referral pricing as a copyable invite link over a three-step reward track: friends invited and joined (2 of 3), the free months each step pays (1 month, 3 months, a year) and what's already earned.