shadcn.io is not affiliated with official shadcn/ui
Split Layout Feature Comparison Table Hero Block for React
A reverse split hero between solid rails: a compact comparison table in a framed figure beside a headline, a Shine Button and three trust points, with your column tinted.
Installation
Overview
A reverse split hero with an inline comparison table, for React with Base UI. On the start side, our Table compares a fictional project tracker with a typical alternative across six features, with a check or a dash in each cell, our column tinted and the starting prices in the footer, in a hairline frame with + marks on its corners. A hairline divider, marked where it meets the top rule, separates it from the copy: a static "Switching is easy" badge, a bold two-line headline, a subtitle, a Shine Button and an outline Button as links, and three trust points. Every cell says "Included" or "Not included" to screen readers, not only with an icon, and the checks are foreground-coloured so the primary colour stays on the one button. On phones the copy comes first and the table follows. The copy fades up and the table slides in from the end side once on load, with CSS transitions; nothing moves for visitors who ask for reduced motion. Made for SaaS landing pages that meet buyers already comparing tools, who want the difference at a glance before they start a trial.
FAQ
How do I change the features and the columns?
Each entry in ROWS is a feature and its values, one true or false per column id. The columns are COLUMNS: an id, the label in the header, the starting price in US dollars a month and featured, which sets your own column in bolder type and tints it. To compare with a second alternative, add its id to ColumnId, an entry to COLUMNS and a value to every row. Five to seven rows keep the table about as tall as the copy beside it.
How do screen readers read the comparison table?
It's a native table named "Us compared with others". The column labels are column headers and each feature is a row header, so a screen reader reads a cell with both, such as "Real-time collaboration, Others, Not included".
The check and the dash are hidden from assistive technology, and each cell carries a visually hidden "Included" or "Not included". The prices are read as "$19 per month".
Should I name the competitor in the column?
You can: change the "Others" label to the product you compare against, and it's read with every cell of its column. Only claim what a buyer can verify on the other product's own pricing page today, and check the table each time either product ships a plan change. A generic "Others" column keeps the claim about the category rather than one company.
How are the starting prices shown, and do they work right to left?
Each price is plain text from its column's price: the dollar sign, the number and "/mo" sit in one dir="ltr" span, so "$19/mo" never reverses in a right-to-left page, and the "/mo" is shown but hidden from screen readers, which read "per month" instead. For another currency, change the sign and the numbers, or format them with Intl.NumberFormat.
How does the split layout with a table fit on a phone?
Below the lg breakpoint the halves stack, the copy first so both buttons are on the first screen, then the table in its frame. The table is table-fixed with two narrow value columns, so the feature names wrap instead of pushing the table wider, and it fits without scrolling down to 320px. The headline steps down to text-4xl, and the calls to action and the trust points wrap.
When should I use a comparison table in the hero?
Use it when your visitors already know the alternative and arrive comparing, from a "vs" search or a review site, and a handful of differences make the case. For a full feature-by-feature comparison of your own plans, use a pricing comparison table further down the page; to sell your strengths without naming an alternative, use feature badges or cards.
Related
- Pro
Split Panel Comparison Hero
Features and tablesA 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
Split Layout Feature Badges Hero
Features and tablesA split hero between solid rails: a headline and a Shine Button beside five feature rows ruled as bands, each with an icon tile, a label and a one-line description.
- Pro
Centered Compatibility Matrix Hero
Features and tablesA showcase centered hero for an SDK: a release pill, a two-line headline, a Shine Button and an outline button, then a platform by capability table in a hairline frame.
- 12345Pro
Split Layout Numbered Feature List Hero
Features and tablesA split hero between solid rails: an announcement link, a headline and a Shine Button with an outline button on one side, a divider, and a numbered list of six features as ruled rows on the other.
- Pro
A centered pricing hero with Free and Pro side by side in one hairline band, the Pro cell tinted and holding the Shine Button, and a plan switch on phones.
- Pro
FAQ Accordion Hero
Interactive demosA compact hero on ruled bands between solid rails: a headline and a Shine Button, then a band with four common questions in an accordion that opens one at a time, beside a short note.