Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Struck Through Before After Block for Radix UI

Tabs of three workflows, each with a Before list where removed steps are struck through and an After list, a step count and one customer line.

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 before-and-after block for React with Radix UI, written for Handoffly, a fictional document-approvals tool. A line tab band lets you pick a workflow: contract renewals, expense sign-off or new-hire paperwork. The open panel shows two lists side by side. Before keeps every old step in order and strikes through the ones that disappeared; After lists the steps that remain and what changed in each. A foot band sets the count, such as 5 steps to 2, worked out from the lists, beside one customer's line. Every panel is sized by an unseen copy of the others, so switching never moves the page. It is built from Tabs and Guides. The customers and figures are example data.

FAQ

How do screen readers know a step is gone?

A removed step is a real del element, and a hidden prefix reads "Removed:" before it, so the strike-through is not only visual.

Where does the count come from?

It is worked out from the two lists. Add or strike a step in the data and "5 steps to 2" and the number of removed steps update themselves.

Does the page move when I switch workflow?

No. An unseen copy of every panel sits in the same grid cell as the open one, so the cell is always as tall as the tallest workflow.

How does the keyboard work on the tabs?

Tab moves into the tab list, and the arrow keys move between workflows on Ark and Radix. React Aria and Base UI also let you move with arrows inside the list. Each tab reveals its panel.

What happens on a phone?

The tab band scrolls sideways and the two lists stack, Before above After.

Are the quotes real?

No. Handoffly, its customers and their quotes are fictional and the figures are example data.