Files
supabase/apps/www/components/Pricing/PricingDiskSection.tsx
anthony lio b1d59e0ee8 feat(www): pricing (#53320)
## Problem

- pricing page shows checks in the bright brand green
- pro button sits lower than the other plan buttons, and each price sits
lower than its plan name
- compute slider has no step marks, so a reader cannot see the sizes
before a drag

## Solution

- changes the plan cards so names, prices and buttons line up, and the
pro card has the only green button
- replaces the bright green check circles with tinted checks and drawn
minus icons, so both icons pass contrast
- adds step marks and a hover preview to the compute slider, so the
badge and price show a size before the click
- adds a tab above the micro row in the compute table, so readers see
which size the plan credits cover
- fixes the spend cap chart, which showed the bars of both states on
toggle because css transitions changed the motion values

| before | after |
|
---------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
| <img width="2880" height="23304" alt="pricing-before"
src="https://github.com/user-attachments/assets/c42c7487-e0fb-4914-a210-844fe67015bd"
/> | <img width="2880" height="22958" alt="pricing"
src="https://github.com/user-attachments/assets/e2066006-f610-4c53-a5a7-94525966fefc"
/> |

## Preview links

| Site | Live | Preview |
| ---- |
------------------------------------------------------------------------------------
| --- |
| WWW | [/pricing](https://supabase.com/pricing) |
[/pricing](https://zone-www-dot-com-git-antlio-feat-www-pricing-supabase.vercel.app/pricing)
|

## Review instructions

1. visit
[/pricing](https://zone-www-dot-com-git-antlio-feat-www-pricing-supabase.vercel.app/pricing)
2026-11-20 07:54:40 +02:00

114 lines
4.5 KiB
TypeScript

import { ArrowUpRight } from 'lucide-react'
import { Button } from 'ui'
import Panel from '../Panel'
const diskTypes = [
{
name: 'General Purpose',
tagline: 'Balance between price and performance',
maxSize: '64 TB',
size: '8 GB included\nthen $0.125 per GB',
iops: '3,000 IOPS included\nthen $0.024 per IOPS',
throughput: '125 MB/s included\nthen $0.095 per MB/s',
durability: '99.9%',
},
{
name: 'High Performance',
tagline: 'For mission critical applications',
maxSize: '60 TB',
size: '$0.195 per GB',
iops: '$0.119 per IOPS',
throughput: 'Scales automatically with IOPS',
durability: '99.999%',
},
]
const PricingDiskSection = () => (
<div>
<div className="text-center mb-8 lg:mb-16">
<h2 className="text-foreground text-3xl">Advanced disk configurations</h2>
<p className="text-foreground-light mt-4 text-lg mb-4">
Scale database storage up to 60 TB and 80,000 IOPS.
</p>
</div>
<Panel outerClassName="gap-4 mx-auto max-w-6xl">
<div className="px-2 pb-2">
<table className="text-foreground m-0 hidden w-full table-auto overflow-hidden rounded-b lg:table text-sm">
<thead>
<tr>
<th></th>
<th className="px-3 py-2 text-left font-medium text-foreground-light">Max Size</th>
<th className="px-3 py-2 text-left font-medium text-foreground-light">Size</th>
<th className="px-3 py-2 text-left font-medium text-foreground-light">IOPS</th>
<th className="px-3 py-2 text-left font-medium text-foreground-light">Throughput</th>
<th className="px-3 py-2 text-right font-medium text-foreground-light">Durability</th>
</tr>
</thead>
<tbody>
{diskTypes.map((diskType) => (
<tr key={diskType.name} className="bg-surface-100 rounded-lg">
<td className="p-3">
<span className="text-base">{diskType.name}</span>
<br />
<span className="text-foreground-lighter">{diskType.tagline}</span>
</td>
<td className="p-3">{diskType.maxSize}</td>
<td className="p-3 whitespace-pre-line" translate="no">
{diskType.size}
</td>
<td className="p-3 whitespace-pre-line" translate="no">
{diskType.iops}
</td>
<td className="p-3 whitespace-pre-line" translate="no">
{diskType.throughput}
</td>
<td className="p-3 text-right tabular-nums">{diskType.durability}</td>
</tr>
))}
</tbody>
</table>
<table className="text-foreground m-0 -mt-12 lg:mt-0 w-full table-auto overflow-hidden rounded-b lg:hidden text-xs">
{diskTypes.map((diskType, idx) => (
<tbody key={`${diskType.name}-mobile`}>
<tr>
<th className="py-3 pl-4 text-left font-medium pt-16 lg:pt-3 w-[60%]">Disk Type</th>
<td className="px-4 py-3 text-primary pt-16 lg:pt-3">{diskType.name}</td>
</tr>
<tr>
<th className="py-3 pl-4 text-left font-medium ">Max Size</th>
<td className="px-4 py-3 whitespace-pre-wrap">{diskType.maxSize}</td>
</tr>
<tr>
<th className="py-3 pl-4 text-left font-medium ">Size</th>
<td className="px-4 py-3 whitespace-pre-wrap">{diskType.size}</td>
</tr>
<tr>
<th className="py-3 pl-4 text-left font-medium ">IOPS</th>
<td className="px-4 py-3 whitespace-pre-wrap">{diskType.iops}</td>
</tr>
<tr>
<th className="py-3 pl-4 text-left font-medium ">Throughput</th>
<td className="px-4 py-3 whitespace-pre-wrap">{diskType.throughput}</td>
</tr>
<tr>
<th className="py-3 pl-4 text-left font-medium ">Durability</th>
<td className="px-4 py-3 whitespace-pre-wrap">{diskType.durability}</td>
</tr>
</tbody>
))}
</table>
</div>
</Panel>
<div className="mt-8 flex justify-center">
<Button asChild size="tiny" iconRight={<ArrowUpRight className="w-4" />}>
<a href="https://supabase.com/docs/guides/platform/compute-and-disk#disk">
Learn about advanced disk config
</a>
</Button>
</div>
</div>
)
export default PricingDiskSection