Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Metric Toggle Tiles Pricing Block for React

Three plan tiles for a push-notification service under a large four-way quota switch: pick pushes, devices, segments or seats and every tile's headline figure rolls to that plan's limit. A snap carousel on phones.

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 plans on the number that matters to each buyer with this metric toggle pricing section, shown here for Nudge Push, a push-notification service. A large Segment Group in the header row switches the quota between pushes a month, devices, saved segments and team seats, and each tile's headline figure, set at display size, rolls to the chosen plan's limit with Sliding Number (500K, 10M and 250M pushes become 10K, 250K and 5M devices). Under the figure sit the plan's starting price, a Shine Button call to action and three features. The tiles are separate cells whose hairlines from Guides run a little past their corners, with a + mark on each; the featured Flare tile is raised and holds the one primary button. Below the lg breakpoint the tiles are a snap carousel that opens on Flare, with the next tile peeking and one named dot per plan. Built with Badge, Guides, Segment Group, Sliding Number, Shine Button and Lucide icons, with CSS transitions only. For API, messaging and infrastructure pricing where every plan scales on several limits.

FAQ

How do I change the quotas and plans?

Edit the top of the file. OPTIONS lists the switch's labels, and METRICS has one entry per quota: its label, its unit and a quotas object with one entry per plan, each with the figure's value, an optional suffix for compact figures (the K in 500K) and a caption that says it in words. PLANS holds each plan's name, tagline, starting price, cta, href, features and popular. To add a quota, add its id to MetricId, an option and a metric entry.

How do I connect the tiles to checkout?

Each call to action is a real link to its plan's href. It is a ShineButton with render set to an a element and nativeButton={false}. Point the paid plans at your checkout with the plan in the query; the quota the visitor was looking at isn't sent, because every plan scales on all four.

Is the switch accessible?

The quota switch is a radio group named "Quota": arrow keys move and select, and the figures change as you go. The big number is hidden from screen readers, because the caption under it says the same in words ("Up to 10 million pushes a month"); the metric's label above it is read first. Plans are h3 headings, prices are read as "per month" and each button names its plan.

How do the tiles work on a phone?

The quota switch becomes a two-by-two grid. The tiles sit in a horizontal scroller that snaps to each tile, opens on Flare and lets the next tile peek in; the dots under it are buttons named "Show the Flare tile". The figure's unit goes on its own line and the caption keeps room for two lines, so switching the quota never moves the buttons.

What changes when a visitor prefers reduced motion?

The entrance and the fade on each label and caption are switched off, so the text changes at once. Nothing else on the page moves.

When should I use a quota switch rather than a feature table?

Use it when plans differ mainly in a few numeric limits and buyers care about different ones: the switch lets each of them see the limit they care about at display size. A feature table is better when plans differ in many yes-or-no features.

  • Pro

    Four CDN plans as rows of one hairline table, each led by its monthly transfer: a bar to scale across the row with the allowance written big at its end, then the price and a call to action.

  • Pro

    Billing Toggle Pricing

    Billing switches

    Three plan cards under a monthly and yearly switch that wears its saving in the header row, with prices that roll to their new amount and each plan a card in a card.

  • Pro

    Three large audience tiles in the header row (freelancer, studio, agency) that open their own plans: cells that share hairlines on desktop, one plan at a time behind a segment group on a phone.

  • 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

    A monthly estimate for Light, Standard and Heavy usage of a speech-to-text API: choosing a profile rolls the total, resizes a tall stacked bar of where the bill comes from and updates each cost line.

  • Pro

    The canonical three-column pricing section for a team knowledge base: Personal, Team and Company cells under a monthly and yearly switch, each outlined by hairlines that overshoot its corners, the recommended plan raised, one plan at a time on phones.