shadcn.io is not affiliated with official shadcn/ui
Discount Offer Notification Block for React
A plant shop's 30% off coupon drawn as a notched ticket, with a code you can copy to the clipboard, an end date, folding terms and a claim button that says it only applied the code in this demo.
Installation
Overview
Make an offer feel like something you hold with this discount notice for React with Base UI. It is Terrafold, an online plant shop, with no frame at all: the ticket is the frame. It is a card with a half-circle notch cut into both edges where the offer meets the stub, cut by a CSS mask so the page shows through. The top says "30% off" for annual plans with a Badge; the stub holds the code ANNUAL30 in mono with a Copy Button that writes to the real clipboard, and the day the offer ends. A Collapsible folds the terms open under the ticket. Claim offer is the one Shine Button. For promo banners, win-back emails and any coupon shown in the app.
FAQ
How do I use my own offer?
Edit CODE, ENDS (a date in UTC), TERMS and the offer text in the top of the ticket. If the top part needs a different height, change TOP: the notch sits on its lower edge and the mask follows.
How is the notch made?
Two stacked layers, each masked by a pair of radial gradients at the two edges: the outer layer is the one pixel outline, and the inner layer is the card, cut slightly wider so a ring of outline stays round each notch. It is CSS only, so it works on any background, in light and dark, and mirrors in right-to-left.
Does the copy button really copy?
Yes, it writes ANNUAL30 to the system clipboard and a status line says "Copied ANNUAL30." If the clipboard is blocked (a page that is not served over HTTPS) the button shows a cross instead.
Related
- Pro
Referral Rewards Pricing
Discounts and offersReferral 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.
- Pro
A fitness app's referral ladder: a progress bar with ticks at 1, 3 and 5 friends, the credit earned as a rolling figure, three rungs marked Reached or Next, and an invite link and message you can copy.
- Pro
Announcement Notification
Floating cardsA what's new card for a product analytics app: three updates in a carousel with Previous, Next and the place in words, a Don't show this again box, and a Dismiss that folds the card.
- Pro
A medal shelf for a learning platform after a learner finishes a first project: eight drawn medals in a hairline grid with a New badge on the latest, and a popover on each medal with its criteria, a progress bar and the day it was earned.
- Pro
A project's history as a vertical timeline split in two: six event types as chips with live counts in a start column, and the timeline of who did what beside them, filtered by the types you press, with Load earlier events and a designed empty state.
- Pro
Alert Banner Notification
Incidents and alertsAn operations console's banner bar over a sketch of its app: four notices queue by urgency and show one at a time, with Previous, Next, a link, Dismiss and Snooze all for an hour.