Filtering revenuesimilar to
Stripe
The filter bar of a subscription billing dashboard, rebuilt on about 1,700 sample subscriptions. One button holds the date range; its popover offers presets on the left, Start and End inputs and a two-month range calendar on the right, and changes nothing until Apply. Next to it, an interval select (daily, weekly, monthly) and a comparison select. Every chart, headline number and change badge is computed from the same daily series, so the charts always agree with each other. The dashboard around the filters (sidebar, top bar, page actions, the other reports) is a wireframe sketch where your own app goes.
Every screen
The 5 steps in order. Pick one to open it in the preview above.
Installation
Part of shadcn/ui Pro
Pro unlocks one-command install of every flow in Radix UI, Base UI and React Aria, plus all 507 blocks, the Figma kit, themes and the MCP server for your AI editor.
Part of shadcn/ui Pro
Pro unlocks one-command install of every flow in Radix UI, Base UI and React Aria, plus all 507 blocks, the Figma kit, themes and the MCP server for your AI editor.
Why this flow works
A date range filter for a metrics dashboard: presets, typed dates and a two-month calendar in one popover, with interval and comparison selects that redraw every chart from the same data.
One date button, three ways to pick
Presets cover the ranges people ask for every week (last 7 days, month to date, all time); the calendar and the typed Start and End dates cover the rest. The button shows the preset name, or the dates of a custom range, so the page always says what it shows.
Draft until Apply
Picking a preset or clicking days only changes the popover: the highlighted preset, the inputs and the calendar. The charts redraw once, on Apply, and Escape or a click outside throws the draft away. That keeps a dashboard with many charts from recomputing on every click.
The interval follows the range
Daily is offered up to four months, weekly from two weeks and monthly from two months; options that would draw one bar or hundreds of points are disabled. Applying a range keeps the current interval when it still fits and otherwise picks one, which is why "All time" switches the charts to monthly.
Comparison as a quiet second line
The previous period (or the same dates last year) is drawn as a dashed muted line behind each line chart, and the headline gets a green or red change badge. When the comparison falls before the first data, the line and badge disappear instead of showing a misleading +100%.
Step by step
- 01
Billing overview
Revenue for the last 7 days, daily: MRR, MRR growth, net volume and growth rate, each compared with the previous 7 days.
The default view answers "how was this week?" without any input. The filter row above the charts says which range, interval and comparison every number uses.
- 02
Open the date range
The date popover: presets on the left with Last 7 days highlighted, the Start and End dates and the range on a two-month calendar.
The current range is shown three ways (preset, typed dates, calendar), so people can adjust it from whichever they trust. Nothing on the page changes yet.
- 03
Choose All time
All time is highlighted: the inputs read 03/04/2024 to 11/23/2026 and the calendar fills both months.
A preset updates the inputs and moves the calendar so the selection is visible, which confirms the choice before anything is redrawn.
- 04
All-time revenue, monthly
The charts redrawn for all time: 33 monthly buckets from March 2024, the interval switched to Monthly and the button reading All time.
Daily points over two and a half years would be noise, so the interval follows the range. The comparison has no earlier data to show, so its line and badges are gone rather than misleading.
- 05
Subscribers
The Subscribers tab keeps All time and Monthly: active, net growth, new and churned subscribers, then subscriptions by product.
The filters belong to the page, not to a tab, so switching reports keeps the period. The breakdown select regroups the same subscriptions by product, billing interval or currency.
Built with shadcn/ui and Radix UI
- Button
- Popover
- Calendar
- Input
- Label
- Select
- Tabs
- Chart
This is an original rebuild of the flow's structure, with its own brand, copy and artwork. Stripe is a trademark of its owner; this page is not affiliated with or endorsed by Stripe.
Frequently asked questions
Installing, adapting and theming this flow for Radix UI.
With a Pro plan, run npx shadcn@latest add @shadcnpro/flow-stripe-filtering-revenue. The shadcn CLI copies the flow into components/flows/stripe-filtering-revenue/ and adds the shadcn/ui components it uses. Base UI (@shadcnpro/base/flow-stripe-filtering-revenue) and React Aria (@shadcnpro/aria/flow-stripe-filtering-revenue) ship the same flow, with the same steps and copy.
No. It is an original rebuild of the structure of Stripe's filtering & sorting flow, written from scratch with shadcn/ui, with its own brand, copy and artwork. Stripe is a trademark of its owner, and this page is not affiliated with or endorsed by Stripe.
Yes, the flow is a pattern, not a fixed template. A step you add should follow the same rules as the others, listed under Step anatomy in the flow spec, so it reads as part of the same flow.
Use the prompt in the Installation section. The agent installs the flow, then reads the flow spec at https://pro.shadcn.co/flows/stripe-filtering-revenue.md, which describes the layout, the rules every step follows, each step's fields and actions, and how to adapt the flow. That way it builds a version with your brand and your steps instead of a one-to-one copy.
Yes, within the page. About 1,700 subscriptions with plans, currencies, upgrades and cancellations are generated in memory from a fixed seed, and every chart, total and change badge is computed from them for the range, interval and comparison you choose. "Today" is fixed to November 23, 2026 so the screenshots stay stable. In a real app, load daily metrics from your API for the applied range and swap `TODAY` for the current date.
Button, Popover, Calendar, Input, Label, Select, Tabs and Chart, in their Radix UI versions. Everything else is plain markup with Tailwind CSS.
Yes. The flow only uses semantic tokens such as bg-background, bg-card and text-muted-foreground, so it picks up your colours, radius and fonts and switches with dark mode. Use the theme menu above the preview to see it in the Pro themes.
Yes. Below the medium breakpoint the sketched sidebar is hidden, the metric grid becomes one column and the tabs scroll sideways. In the date popover the presets wrap above the inputs and the two calendar months stack, and the popover scrolls when it is taller than the screen.