Skip to content
shadcn.io

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.

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

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.

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.

How does it fit on a phone?

Below md the text stacks above the buttons, which wrap onto a second line when they don't fit side by side, and the three cells shrink to the label and the price. Nothing has a fixed width, so it reads down to a 320 px screen.

When should I use it instead of the plain row?

Use it when the banner has something specific and time-bound to say, such as a renewal or a saving: it's a single line of copy and a row of figures. When the message is a plain pitch, the baseline Left Right Row Dark has the room for a larger headline.

  • Pro

    The 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

    A 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 limits

    A 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

    A 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 bands

    A 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 offers

    A 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.