shadcn.io is an independent project built on shadcn/ui
Installation
Overview
Show what a pledge would do with this crowdfunding product card for React with React Aria. The first band draws the loom beside the amount raised, the backers and the days left, counted from a fixed day to a typed end date, over a funding bar. The second is a choice of four rewards in one group of native radio buttons; one is sold out and cannot be chosen. Choosing a reward draws a hatched segment on the bar and writes the result, "With your $59: $41,259, 82%". The one Shine Button, "Back this project", turns the preview into the real figure here and says "Pledge noted here, nothing is charged"; "Undo" takes it back. For campaigns, fundraisers and any goal with a deadline.
FAQ
How do I change the rewards?
Edit REWARDS: a price in cents, a note and the places left (left and of; use -1 and 0 for no limit). A reward with none left is disabled and reads "Sold out".
Why does the percent barely move?
The percent is rounded down to a whole number from the cents, and one pledge is small against $50,000, so the hatched segment is only a few pixels wide. It is drawn at least 3 pixels wide so it can be seen.
Is there a countdown?
No. The end (ENDS) is a typed date and the days left are counted from a fixed "today" (AS_OF), so the page reads the same on every load.
What stays local, and how do I wire it for real?
The pledge is page state; nothing is pledged, charged or stored. Replace the body of back with a call to your payment provider's hosted checkout, and read the raised amount and backers from your server. The picture is typed shapes: swap Picture for an img.
Related
- Pre-order Production Steps Product CardOffers and buying modes

- Stepped Price Flash Sale Product CardOffers and buying modes

- Numbered Edition Product CardOffers and buying modes

- Stock States Product CardOffers and buying modes

- Benefits Product CardShop basics

- Bid Status Auction Product CardOffers and buying modes
