Pricing Slider
Usage-based pricing calculator: chunky range slider with a square yellow thumb, live per-unit and total price (volume tiers), included-features list and an ink CTA bar.
brutalist/section/pricing-sliderSource
"use client";
import { useId, useState } from "react";
import { cn } from "@/lib/utils";
export interface PricingSliderTier {
/** Upper bound of projects for this tier (inclusive). */
upTo: number;
pricePerProject: number;
}
export interface PricingSliderProps {
kicker?: string;
title?: string;
description?: string;
min?: number;
max?: number;
defaultValue?: number;
tiers?: PricingSliderTier[];
currency?: string;
included?: string[];
cta?: { label: string; href: string };
className?: string;
}
export function PricingSlider({
kicker = "[ 04 ] Pricing",
title = "Pay per project. Readers are free.",
description = "Slide to your number of projects. Volume discounts kick in automatically.",
min = 1,
max = 50,
defaultValue = 8,
tiers = [
{ upTo: 1, pricePerProject: 0 },
{ upTo: 10, pricePerProject: 9 },
{ upTo: 30, pricePerProject: 7 },
{ upTo: Infinity, pricePerProject: 5 },
],
currency = "$",
included = ["Unlimited releases & readers", "AI summaries", "In-app widget", "Email & Slack digests", "Custom domain"],
cta = { label: "Start 14-day trial", href: "#trial" },
className,
}: PricingSliderProps) {
const [projects, setProjects] = useState(defaultValue);
const sliderId = useId();
const tier = tiers.find((t) => projects <= t.upTo) ?? tiers[tiers.length - 1];
const perProject = tier?.pricePerProject ?? 0;
const total = projects * perProject;
const pct = ((projects - min) / (max - min)) * 100;
return (
<section className={cn("da-section da-stroke-b bg-da-bg text-da-fg", className)} aria-labelledby={`${sliderId}-title`}>
<div className="da-container grid gap-10 lg:grid-cols-[1fr_1.1fr] lg:items-center">
<div>
<p className="font-da-mono text-xs font-bold tracking-da-label text-da-muted-fg uppercase">{kicker}</p>
<h2 id={`${sliderId}-title`} className="mt-3 font-da-display text-[clamp(2rem,5vw,3.5rem)] leading-[0.95] tracking-da-display uppercase">
{title}
</h2>
<p className="mt-4 text-lg text-da-muted-fg">{description}</p>
<ul className="mt-8 grid gap-3 sm:grid-cols-2">
{included.map((i) => (
<li key={i} className="flex items-center gap-3 font-bold">
<span aria-hidden className="da-stroke size-4 bg-da-success" />
{i}
</li>
))}
</ul>
</div>
<div className="da-stroke bg-da-surface text-da-surface-fg shadow-da-lg">
<div className="p-8">
<div className="flex items-baseline justify-between gap-4">
<label htmlFor={sliderId} className="font-da-mono text-xs font-bold tracking-da-label uppercase">
Projects
</label>
<output htmlFor={sliderId} className="font-da-display text-5xl tracking-da-display">
{projects}
</output>
</div>
<input
id={sliderId}
type="range"
min={min}
max={max}
value={projects}
onChange={(e) => setProjects(Number(e.target.value))}
aria-valuetext={`${projects} projects, ${currency}${total} per month`}
className="da-focus da-stroke mt-6 h-5 w-full cursor-pointer appearance-none bg-da-surface-2 [&::-moz-range-thumb]:size-8 [&::-moz-range-thumb]:rounded-none [&::-moz-range-thumb]:border-[3px] [&::-moz-range-thumb]:border-da-border [&::-moz-range-thumb]:bg-da-primary [&::-webkit-slider-thumb]:size-8 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:border-[3px] [&::-webkit-slider-thumb]:border-da-border [&::-webkit-slider-thumb]:bg-da-primary [&::-webkit-slider-thumb]:shadow-da-sm"
style={{ backgroundImage: `linear-gradient(to right, var(--da-secondary) ${pct}%, transparent ${pct}%)` }}
/>
<div className="mt-2 flex justify-between font-da-mono text-[11px] font-bold text-da-muted-fg">
<span>{min}</span>
<span>{max}+</span>
</div>
</div>
<div className="da-stroke-t grid grid-cols-2">
<div className="p-6">
<p className="font-da-mono text-[11px] font-bold tracking-da-label text-da-muted-fg uppercase">Per project</p>
<p className="mt-1 font-da-display text-2xl tracking-da-display">
{currency}
{perProject}
</p>
</div>
<div className="da-stroke-l bg-da-primary p-6 text-da-primary-fg">
<p className="font-da-mono text-[11px] font-bold tracking-da-label uppercase">Total / month</p>
<p className="mt-1 font-da-display text-4xl tracking-da-display" aria-live="polite">
{total === 0 ? "Free" : `${currency}${total}`}
</p>
</div>
</div>
<a href={cta.href} className="da-focus da-stroke-t block bg-da-fg px-6 py-4 text-center font-bold text-da-bg hover:bg-da-secondary hover:text-da-secondary-fg">
{cta.label} →
</a>
</div>
</div>
</section>
);
}
export default PricingSlider;
modules/brutalist/section/pricing-slider/index.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| kicker / title / description | string | — | Header copy. |
| min / max / defaultValue | number | 1 / 50 / 8 | Slider range and initial value. |
| tiers | PricingSliderTier[] | — | { upTo, pricePerProject }[] sorted ascending; the first matching tier applies. |
| currency | string | "$" | Currency symbol. |
| included | string[] | — | Features included in every plan. |
| cta | { label: string; href: string } | — | CTA bar. |
| className | string | — | Classes on the <section>. |
Other pricing variants in Brutalist
Pricing Comparison
Full feature matrix: ruled table with plan headers (price + CTA, highlighted plan in yellow), ink group separator rows and check / dash / text values, horizontally scrollable on mobile.
Pricing Single
Single-plan pricing card: giant price on a yellow panel, numbered feature grid on paper, full-width ink CTA, guarantee line and a rotated pink discount sticker.
Pricing Tiers
Three plans glued together in one ruled strip, the highlighted plan pops out in solid yellow with a rotated badge. Monthly/yearly toggle with discount chip, custom-price plan support.
Pricing in other art directions
Pricing Credits
Pay-as-you-go pricing: four glass radio cards of recording-hour packs (tags like Popular / Best value) feeding a gradient summary card with price, per-hour cost, inclusions and CTA.
Pricing Duo
Free vs paid in one glass panel: two plan headers with price and CTA over a shared feature table (checks, dashes, values); the paid column is tinted with a soft gradient and a gradient CTA.
Pricing Frosted
Three frosted pricing cards with a pill billing toggle; the featured plan gets a gradient frame, gradient badge and gradient CTA and stands slightly taller. Per-seat units and custom pricing supported.
Pricing Spotlight
Single-plan pricing: a wide glass card split into a gradient price block (plan, big price, CTA, sales link) and a two-column feature list with a money-back guarantee and customer wordmarks.
Pricing Columns
Three quiet pricing columns with a segmented monthly/yearly control, per-seat units, and a featured plan lifted by a ring, soft shadow and an indigo hairline highlight on top.
Pricing Rows
Plans stacked as full-width horizontal rows (name + description, highlight chips, price, CTA), the featured one ringed in indigo, followed by an inverted ink enterprise strip.
Pricing Table
Full plan comparison table: four plan columns with price and CTA in the header, grouped feature rows with checks, dashes or values, featured column tinted; horizontally scrollable on small screens.
Pricing Usage
Seat-based pricing calculator: range slider for responders, four volume tiers with the active one highlighted, monthly/yearly toggle and a live estimated total panel with inclusions and CTA.
Pricing Columns
Three plan columns separated by hairlines (no cards): mono plan name, huge price, note, ruled feature list and a button; the featured plan has an ink button and a signal dot.
Pricing One
Single-price poster: a gigantic price set in the display face across the left, and on the right a short pitch, a two-column “included” list with en-dashes and an ink CTA; separated by a full-ink rule.
Pricing Table
Plain typographic comparison table: ink header rule, mono column heads, hairline rows, em-dash for absent features, and the featured column marked with a signal dot.
Pricing Toggle
Pricing as a ruled list: a text toggle “Monthly / Yearly (−20%)” with an underline on the active option, then one row per plan — name, blurb, price, arrow link — rows invert on hover.
Pricing Fees
Pay-as-you-go fee sheet: big per-method rates in bordered cells (4-up), then a “no hidden fees” checklist band.
Pricing Matrix
Enterprise feature matrix: sticky-looking header row of plans, grouped rows with section headings, checks/dashes/values and a tinted featured column.
Pricing Tiers
Three bordered tiers with a monthly/annual segmented toggle; the featured tier has a blue top bar and “Most popular” badge; enterprise shows “Custom”.
Pricing Volume
Volume-based fee calculator: stepped slider of monthly payment volume, the blended rate tier highlighted in a tier table, and an estimated monthly fee vs. a typical 2.9% processor.
Pricing Compare
Soft comparison table: rounded card, plan names in serif with prices, zebra rows in warm tints, sage check circles and dashes, highlighted featured column.
Pricing Single
One honest plan: a wide rounded card split into a sage-tinted price side (big serif price, CTA, guarantee) and a two-column “everything included” list.
Pricing Team
Team-size calculator: a warm range slider (10–500 people) drives a big serif monthly price, annual saving line and a sapling illustration that grows with team size.
Pricing Tiers
Three rounded plans on cream; the middle one sits on a deep sage card (inverted colors) lifted slightly higher, with a leaf ribbon; checklists use soft tinted checks.
Pricing Cards
Three rounded plan cards with emoji (Sprout, Bloom, Forest), a pill monthly/yearly toggle, mint tick lists, and the featured plan filled in lavender with a tilted butter “Most loved” sticker.
Pricing Compare
Rounded comparison table inside a white card: soft zebra rows, round mint check and grey dash badges, and a lavender featured column with rounded head.
Pricing Duo
Two big plan blocks side by side: a mint “Free” block and a periwinkle “Pro” block with light text, huge rounded prices, round-tick feature lists and contrasting pill CTAs.
Pricing Team
Team-size price calculator: big round −/+ stepper around an editable number, avatar dots popping in for each person (paid seats ringed), and a butter summary card with the live monthly total.