Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Plan Price Editor Table Block for React

A table of subscription plans whose prices you edit in number fields, with monthly recurring revenue, shares, the change against the saved prices and a Save changes button.

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

See what a price change does before you make it, with this plan price editor table for React with Base UI. Five plans sit in a native table, each with its price in a Number Input, its subscribers, the monthly recurring revenue (MRR) it brings and its share of the total. A strip over the table says what MRR next month comes to at the prices typed, how far that is from the saved prices as an arrow, a sign and a word, and how many subscribers the change reprices. A switch decides who pays the new price: on, every subscriber on a changed plan moves; off, existing subscribers keep today's price and only people who join next month pay the new one. Yearly plans count a twelfth of their price a month, shares always add to 100, and a price must be a whole number above zero, with the reason in a line that is always there. Save changes moves the saved prices to the typed ones and Reset puts the typed ones back. It's built from Number Input, Switch, Button and Shine Button. For pricing pages, plan editors and anywhere a number has a consequence.

FAQ

How is MRR worked out?

Each plan's price per interval becomes a monthly amount (a yearly price divided by twelve), and MRR next month is that amount times the plan's subscribers plus the people expected to join, in whole cents. With the switch on, all of them pay the typed price; with it off, existing subscribers pay the saved price and only the people joining pay the typed one.

What does Reprice existing subscribers change?

It changes who pays the new price, and so how many subscribers the change reprices and how far MRR moves. Off is the cautious default: the same edit moves MRR by much less, and the strip says that existing subscribers keep their price.

Why do the shares always add to 100?

Each plan's share is its MRR over the total, and the rounding is done by largest remainder: every share is rounded down and the missing points go to the plans with the biggest fractions, so the column never reads 99 or 101.

What if a price is empty or zero?

The plan keeps using its saved price in the sums, the field is marked invalid and a line under it says a price above 0 is needed. Save changes refuses and names the plan in the status line until it is fixed.

What changes on a phone?

The Interval, Subscribers and Share columns go below the medium breakpoint: the interval and subscribers fold under the plan name and the share under the MRR. The Save changes and Reset buttons stay pinned to the bottom of the screen as one bar.

What stays local, and how do I wire it for real?

Nothing is billed and nothing is stored: the plans are typed in the file and Save changes only moves this page's saved prices. To wire it up, send the typed prices from the save handler to your billing API and replace the saved prices with what it returns; keep the derived MRR, shares and repriced count.

  • Pro

    A hire quote whose footer works down from the subtotal through a percentage discount, a tax rate, a flat delivery charge and the total, each showing its formula.

  • Pro

    A sales forecast grid where every number is a field, with live row and column totals, a dot on each changed cell, arrow keys and Enter between regions, Undo and Reset.

  • Pro

    A shop price list whose price and stock cells turn into a field in place, with Save, Cancel, Escape, a reserved line for the reason a value is refused and Undo.

  • Pro

    Every plan side by side inside app settings: a table with the account's own plan marked and tinted, one change button per plan, a row for when each change takes effect, and plan tabs on a phone.

  • Pro

    A print job queue where rows are reordered with Move up and Move down buttons or by dragging a grip, and a Starts at column recomputes from the order and the durations.

  • Pro

    A spreadsheet-like sprint tracker in a fixed window, a grid with one tab stop that moves with arrows, Home, End and Page keys, edits with Enter and cancels with Escape.