shadcn.io is not affiliated with official shadcn/ui
Compact Left Right CTA Block for React
A slim renewal band between solid rails with a Shine Button and an outline link on the end side, and a closing band of three cells that sets the two prices and the saving side by side.
Installation
Overview
A short upgrade banner for React with Base UI, between the page's solid rails and following your theme. The headline and one line of copy sit on the start side, a Shine Button "Switch to annual" and an outline "Compare plans" on the end side. Under them a closing band of three cells on shared hairlines sets the monthly price, the yearly price and the saving side by side. The line tells the visitor when their plan renews, in words that stay true ("in 5 days", counted from the visit, never a date that goes stale), and the percentage is worked out from the two seat prices. It's built from Relative Time Text, Shine Button, Button and Guides, with your theme's tokens for every colour. Use it as a section break or a renewal nudge where a centred band would feel too heavy.
FAQ
How do I change the prices and the saving?
Edit MONTHLY and YEARLY at the top of the file, the price of one seat a month on each billing. The three cells and the percentage are worked out from them with whole-number maths, rounded down, so it never claims more than the prices give: 15 and 12 make 20%. Change the prices and the cells follow.
Where does the renewal time come from?
The banner counts RENEWS_IN_DAYS days from the moment the page runs in the browser, so it always reads "in 5 days" however late it's visited. That's a stand-in: pass your customer's real renewal date to Relative Time Text's timestamp and it keeps the words true, changing them as the date nears. Until the browser has read the clock the sentence says "in 5 days", so nothing shifts and nothing is blank without JavaScript.
Where do the links go?
Both are links (href="#"): point Compare plans at your pricing page and Switch to annual at your billing screen.
Each renders the link it's given with render, with nativeButton={false}.
Does it stay dark on a light page?
No: it follows your theme. The band is drawn with the page's own lines and tokens, so it is light on a light page and dark on a dark one, and the headline, the muted line and both buttons are measured against the page colour in every preset.
Related
- Pro
Left Right Row CTA
Slim bandsThe baseline left-right call to action: a split between solid rails with a headline and one line at the start and, past a divider, a tinted cell at the end that holds the Shine Button over an outline action.
- Pro
Left Right CTA with Eyebrow Pill
Card in cardA card-in-card call to action that follows your theme: a headline with a quiet outline pill that links to a customer story, one sentence, and the Shine Button with an outline action at the end.
- Pro
Digit Countdown Banner
Urgency and limitsA slim early-pricing band between the page rails, in your theme: the offer at the start, then past a solid divider a live countdown to the end of this month in a small frame beside a Shine Button, with a hairline along the bottom edge that drains as the month runs out.
- Pro
Compact Segmented Tab Control CTA
Slim bandsA slim upgrade band between solid rails, split by a divider: the headline with a rolling price at the start, a billing segment and a Shine Button on the end.
- Pro
Icon Banner CTA
Slim bandsA slim band split into cells between solid rails: an icon tile, a solid divider, a title with one line of detail, and a Shine Button link on the end.
- Pro
Pill Dual Action CTA
Prices and offersA band call to action: the saving of paying yearly beside one pill split into two linked halves (monthly in outline, yearly on the Shine Button), with a closing row of three figures worked out from the two prices.