# Console pricing

> A dark-room hardware pricing configurator: three sculpted workload faders with LED bargraphs on the left mechanically wired into high-contrast plan slabs on the right.

Infrastructure and AI products price along multiple axes at once: seats, monthly compute and retention. Console pricing puts an anodized obsidian and brass hardware deck on the left with three tactile fader tracks and 18-segment phosphor LED bargraphs. Dragging any fader updates the recessed dark-glass allocation meter in real time and lights up the matching brass bus terminal on the monolithic plan slabs beside it, recalculating each tier’s live metered rate without a single floating card or generic slider.

## Install

```bash
npx shadcn@latest add @hairline/console-pricing
```

Needs React 19, Tailwind CSS v4 and shadcn/ui theme variables (any style, light and dark). Icons from lucide-react.

- npm: `lucide-react`
- Hairline UI components it needs (the CLI installs them too): none
- Docs and live preview: https://hairlineui.com/blocks/console-pricing
- Registry item (source): https://hairlineui.com/r/console-pricing.json

## Usage

```tsx
import { ConsolePricing } from "@/components/console-pricing";

<ConsolePricing
  onCommitPlan={async ({ planId, billing, faders, estimatedMonthly }) => {
    await fetch("/api/provision", {
      method: "POST",
      body: JSON.stringify({ planId, billing, faders, estimatedMonthly }),
    });
  }}
/>
```

## Multi-axis AI or observability pricing with Space Grotesk

Pass your own fader axes and plan slabs; override --cp-display or any --cp-* colour variable on the root.

```tsx
import { Space_Grotesk } from "next/font/google";
import { ConsolePricing } from "@/components/console-pricing";

const display = Space_Grotesk({ subsets: ["latin"] });

export function PricingDesk() {
  return (
    <ConsolePricing
      tone="obsidian"
      style={{ "--cp-display": display.style.fontFamily } as React.CSSProperties}
      annualDiscountPct={18}
      onCommitPlan={async (selection) => {
        console.log("Selected cluster:", selection);
      }}
    />
  );
}
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `tone` | `'obsidian' \| 'graphite'` | `'obsidian'` | Obsidian-and-brass or graphite-and-copper darkroom finish. |
| `eyebrow / heading / subheading` | `string` | – | Top header strip copy. |
| `annualDiscountPct` | `number` | `18` | Percentage discount applied to metered slab totals when Annual is selected. |
| `faders` | `ConsoleFaderConfig[]` | – | Workload fader axes: id, label, unit, min, max, step, defaultValue, ratePerUnit. |
| `plans` | `ConsolePlanSlab[]` | – | Monolithic plan slabs with basePrice, meteredFactor and maxMeteredThreshold. |
| `onCommitPlan` | `(selection: ConsoleSelection) => Promise<unknown> \| void` | – | Async callback receiving the selected plan, billing cycle, fader map and estimated total. |

## States

- **fader scrub**: Dragging any sculpted fader lights up the 18-segment phosphor bargraph, updates the recessed breakdown meter and eases every slab total.
- **bus match**: When total metered spend crosses a tier ceiling, the brass left-edge bus bar and Matched bus plate switch to the next monolithic slab.
- **billing interval**: Toggling Monthly and Annual recalculates every metered slab immediately with the configured discount.
- **plan commit**: Clicking a slab action runs onCommitPlan with Allocating… and Allocated check feedback in place.
- **reduced motion**: Updates slab totals immediately without numeric easing travel.

## What it handles

Multi-axis SaaS pricing usually turns into an overwhelming spreadsheet or a plain form of range inputs that never connects visually to the plans.

- **Three sculpted hardware fader tracks**: Each axis renders a recessed trough, 18-segment phosphor bargraph and milled metal cap with pointer capture and keyboard arrow keys.
- **Recessed live breakdown meter**: Itemizes each fader’s metered contribution and updates the live delta as you scrub.
- **Mechanically wired plan slabs**: High-contrast monolithic slabs illuminate their brass left-edge bus terminal automatically when workload crosses into their envelope.
- **Own --cp-* obsidian and graphite tones**: Ships with obsidian and graphite hardware palettes that never inherit default theme blues or purples.
- **Inline async cluster allocation**: Passes planId, billing, fader values and estimated monthly spend straight to your onCommitPlan handler.
- **Zero libraries, container responsive**: Stacks cleanly from single-column phones to the 12-column hardware bench using CSS container queries.

## Replaces

multi-slider cost estimator, hardware fader controls, metered pricing slabs, billing interval switch

## Where it fits

- **AI inference & GPU cloud platforms**: Lets teams dial seats, monthly tokens and trace retention to see which dedicated cluster fits.
- **Observability & log pipelines**: Combines ingest volume, host count and retention window into live metered slab totals.
- **Usage-based developer APIs**: Shows exact per-axis allocation inside the dark-glass meter while matching the optimal commitment tier.
- **Enterprise hardware & edge SaaS**: Brings an industrial obsidian-and-brass palette (--cp-*) that looks custom-built for technical buyers.

## Notes

- Self-contained with zero animation libraries and zero external registry dependencies.
- Every fader exposes role="slider" with aria-valuetext and Arrow/Home/End keyboard controls.
- All colours ship as --cp-* CSS variables so buyers can tune brass, room or chassis tones cleanly.

License: MIT (https://hairlineui.com/license#components)
