Product Comparison
A complete product comparison section, ready to adapt to your product.
Make it yours.
Install the editable source and its dependencies into your React + Tailwind project.
Scroll horizontally for long lines
pnpm dlx shadcn@4.0.8 add http://localhost:3000/r/product-comparison.jsonUse it
Scroll horizontally for long lines
"use client";
import {ProductComparison} from '@/components/jez-ui/blocks/product-comparison';
export default function Example(){
return <><ProductComparison/></>;
}Props & types
Scroll horizontally for long lines
{ className?: string }Source
View 2 source files
registry/blocks/product-comparison.tsx
Scroll horizontally for long lines
"use client";
import * as React from "react";
import { cn } from "../ui/utils";
export function ProductComparison({ className }: { className?: string }) {
return (
<section className={cn("overflow-x-auto py-8", className)}>
<h2 className="mb-6 text-3xl">A clearer way to work.</h2>
<table className="w-full text-left text-sm">
<caption className="sr-only">Workflow comparison</caption>
<thead>
<tr className="border-b border-border">
<th className="p-3">Task</th>
<th className="p-3">Scattered workflow</th>
<th className="p-3">Shared workspace</th>
</tr>
</thead>
<tbody>
{[
["Find context", "Search multiple tools", "Open the project"],
["Track a decision", "Ask in a message", "Read the decision log"],
[
"Plan next week",
"Rebuild a spreadsheet",
"Update the shared plan",
],
].map((r) => (
<tr key={r[0]} className="border-b border-border">
{r.map((c, i) => (
<td key={i} className="p-3">
{c}
</td>
))}
</tr>
))}
</tbody>
</table>
</section>
);
}
registry/ui/utils.ts
Scroll horizontally for long lines
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...values: ClassValue[]) {
return twMerge(clsx(values));
}
Dependencies
clsx@2.1.1 · tailwind-merge@3.5.0
Accessibility & behaviour
Provide meaningful labels and preserve keyboard focus styles. Check contrast when customising theme colours.
Read the accessibility and performance guide →