shadcn.io is not affiliated with official shadcn/ui
Compact Left Right CTA Block for Svelte
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 Svelte with Ark 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.
Their asChild receives the props: spread them onto your router's link.
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.