Comparison

import { Comparison } from '@hanzo/ui'

Pricing table

Three plans side by side, the middle one highlighted.

Free
5Users
10GBStorage
Support
Custom domain
Pro
25Users
100GBStorage
Support
Custom domain
Enterprise
UnlimitedUsers
1TBStorage
Support
Custom domain
export function Default() {
return <Comparison columns={plans} />
}

Two plans

The grid tracks follow the column count, not a fixed layout.

Free
5Users
10GBStorage
Support
Custom domain
Pro
25Users
100GBStorage
Support
Custom domain
export function TwoColumns() {
return <Comparison columns={plans.slice(0, 2)} />
}

Feature list

Every row a boolean, read as a checklist rather than a price.

Basic
API access
SSO
Audit log
Team
API access
SSO
Audit log
export function FeatureChecklist() {
const columns: ComparisonColumn[] = [
{
title: "Basic",
items: [
{ label: "API access", value: true },
{ label: "SSO", value: false },
{ label: "Audit log", value: false },
],
},
{
title: "Team",
highlighted: true,
items: [
{ label: "API access", value: true },
{ label: "SSO", value: true },
{ label: "Audit log", value: false },
],
},
]
return <Comparison columns={columns} />
}

Types

export interface ComparisonItem {
label: string
value: boolean | string
}
export interface ComparisonColumn {
title: string
items: ComparisonItem[]
/** Marks the plan the table wants to sell: a raised border and shadow. */
highlighted?: boolean
}
export interface ComparisonProps {
columns: ComparisonColumn[]
children?: never
}

Exports

Comparisontype ComparisonColumntype ComparisonItemtype ComparisonProps