Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Split Before and After List CTA Block for React

A split call to action for a code reviewer: the pitch with a Shine Button and an outline button, beside a panel flush to the rail that sets the old way beside the new one in three ruled rows.

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 split call to action that sells a change in a single glance, for Pullmark, a fictional automated code reviewer. The copy half holds a quiet outline badge, the headline, a short pitch, a Shine Button and an outline button. The other half runs flush to the end rail behind a split divider: a Before and After band, then three rows, each pairing the old way (muted and struck through) with the new one through a round arrow, ruled from one another by solid hairlines. The block sits between solid rails with a top rule and + marks where the divider meets it and where the band's rule meets the rails. Because every pair sits on its own row, a reader compares like with like instead of matching two separate lists. For developer tools, process software, migrations and any pitch built on a clear improvement.

FAQ

How do I change the pairs?

Edit CHANGES at the top of the file: each pair has a was line and a now line. Keep each line short, a phrase rather than a sentence, so the rows stay aligned and readable at half width. Three pairs fill the panel next to the copy; with more, the panel grows taller than the copy and the rows keep their height.

How do the rows stay aligned?

The Before and After labels and every row use the same three-column grid (the old line, the arrow, the new line), so the arrow sits in the same place on each row and the labels sit over their columns. Below the sm breakpoint the band is dropped and each pair reads top to bottom with a downward arrow, because the struck-through line and the arrow already say which is which.

How does a screen reader read a pair?

As one sentence: "Before: Reviews that take days, became, After: Feedback in seconds". The band, the arrow and the word "became" are hidden or shown to match, so the visual arrow adds nothing for assistive technology and nothing is read twice. The pairs are a list, so a screen reader announces how many there are.

Does it work in a right-to-left layout?

Yes. The panel and the divider swap sides with the page direction, the old way sits at the end and the new at the start, and the sideways arrow is mirrored so it still points from old to new. The downward arrow on a phone needs no mirroring.

How does it fit a phone?

The copy comes first, so the Shine Button is on the first screen; the rows follow under a rule that runs from rail to rail. Each pair stacks the old line, the arrow and the new line in one cell, and the three cells keep their ruled hairlines.

What moves, and can I turn it off?

The copy fades up once on load, and the Shine Button sweeps a band of light across itself when you hover or focus it. It's all CSS, with no animation library. With reduced motion on, everything appears in place and the light fades in instead of sweeping.

  • Pro

    Split Attribution Window CTA

    Pickers and toggles

    A reverse split call to action for a partner program: a slider tool in a hairline frame that shows whether a referral still counts on the day a visitor buys, beside the pitch, four benefits and a Shine Button.

  • Pro

    A split CTA for a course: the pitch, a ruled row of totals and a Shine Button beside a numbered accordion whose modules are full-width rows ruled by solid hairlines, each opening to its lessons and durations.

  • Pro

    A centred card-in-card call to action for a deploy platform: a headline, a sentence and the Shine Button, over a closing band of three setup steps staggered along a dashed path that draws itself once.

  • Pro

    A split hero for a site speed tool: a headline, a Shine Button and a second action beside a speed report that fills its cell edge to edge, before on one side of a handle and after on the other.

  • Pro

    Split Panel Comparison Hero

    Features and tables

    A split hero for a status-page product: the headline and two calls to action beside a comparison table against a self-hosted page, in a hairline frame.

  • Pro

    One card with a big Free and Pro switch: flipping it rolls the price and turns the locks on Pro's features into checks, in a single list of eight.