Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Rate Matrix Pricing Block for React

A rate matrix for a messaging API: four plans as columns with their base price and call to action first, then each metered unit as a row of allowance and overage rate, then platform and support rows.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Compare unit rates across tiers at a glance with this rate matrix pricing section. A compact header, a heading and one sentence that tells you how to read a cell, sits under the page's top rule and side rails, drawn by Guides. One table follows, framed between hairlines with a + mark on each corner. The four plans, On demand, Growth, Scale and Enterprise, are its columns, and the first row is each plan's head: its name, its base price and a Shine Button, so the way to buy is above every rate. Under Metered usage, each unit the product bills, texts, picture messages, voice minutes and phone numbers, is a row with a note on what it counts, and every cell gives the allowance included and the rate per unit beyond it, or says Custom for Enterprise. Under Platform and support, throughput, delivery receipts, short codes, support and the uptime SLA follow with checks, dashes and short values. The recommended Growth column carries a soft tint, a Recommended outline Badge and the one primary button. On a phone the matrix becomes plan tabs over one column of rows next to their names, so nothing scrolls sideways. Built with Table, Segment Group, Badge, Shine Button, Guides and Lucide icons, with CSS transitions only. For API platforms, messaging, communications and any metered product with an allowance and a rate per unit.

FAQ

How do I change the metrics, allowances and rates?

Edit METRICS for the metered rows: each has its label, a note under the name, the unit a rate buys ("per message"), and rates with each plan's included allowance (left out where the plan has none) and its overage rate in dollars per unit, or null for a custom rate. Rates are written with at least two decimals and up to four, so $0.02 and $0.0079 both read right. ROWS holds the platform and support rows, each with a value per plan: true for included, false for not included, or a short text. PLANS sets the columns, their base price (0 shows "No monthly fee", null shows "Custom"), call to action and recommended.

How do I connect the plan buttons to metered billing?

Each button in the head row is a real link: point it at a route that subscribes the customer to the plan's base price and attaches a metered price for each unit at the rates in the table, so your billing provider charges the overage at the end of each period. The On demand plan has no base price, so it needs only the metered prices. Each button is a ShineButton with render set to an a element and nativeButton={false}.

Is the rate matrix accessible?

It's a real HTML table named "Rook Messaging rates by plan": plan names are column headers, each metric and feature is a row header, and each section opens with a header that spans the row, so a screen reader announces a cell as, for example, "Growth, Text messages, 25,000 included, then $0.0068 per message".Included and missing features are icons with the words "Included" and "Not included" for screen readers, and each button names its plan.

How does the wide table work on a phone?

Below the md breakpoint the table gives way to a second view of the same data: a Segment Group of the four plan names, with Growth selected, over one plan's price and button and then its rows as a list of names and values. Switching plan swaps the values and nothing scrolls sideways, even at 320 px, where the four names share the width.

When should I use a rate matrix instead of plan cards?

Use a matrix when buyers price your product by usage and need to compare specific numbers, allowances and per-unit rates across several metrics and tiers, to estimate their own bill. Use plan cards when the difference between plans is mostly which features they include rather than how much each unit costs.

  • Pro

    Overage Pricing

    Usage and credits

    Overage pricing drawn as an area chart: pick a plan and see its monthly bill against the gigabytes ingested, a flat shaded block for the allowance and a rising wedge for every extra gigabyte, beside the price and a table of allowances.

  • Pro

    Pay As You Go Pricing

    Usage and credits

    Usage pricing for a serverless platform as rate rows: each billable resource with its free allowance, its starting rate at display size and the two volume steps that lower it, with one call to action in the header.

  • Pro

    Tiered API Pricing

    Comparison tables

    API tiers by request quota, with the quota as the headline: four columns open with 10k, 250k, 2M and 10M+ requests a month at display size, then the price, the overage rate and a call to action, over grouped limits and features.

  • Pro

    Comparison Table Pricing

    Comparison tables

    Four plans compared feature by feature in one table whose hairlines meet the page rails, with a billing switch, a tinted popular column and, on a phone, a plan switch that keeps the feature column beside one plan.

  • Pro

    Per Transaction Pricing

    Sales and partners

    Per-transaction rates for a payments processor as ruled rows, each percentage at display size with its fixed fee or cap, and a region switch and call to action in the header row.

  • Pro

    Prepaid Credits Pricing

    Usage and credits

    A top-up picker for prepaid credits: amount chips that show the bonus each earns, a field for any other amount, and the credits you get rolling to a display-size number over a paid-and-bonus bar.