Xzero UI
Pro library

Revenue explorerPro

A SaaS revenue chart you zoom with a brush while paths, axes and figures glide to the range.

$ pnpm dlx shadcn@4.23.0 add @xzero-ui-pro/revenue-explorer
Live · keyboard ready

Use this for MRR or other monthly flow metrics on an analytics page. Replace the seeded months in revenue-data.ts with your billing data; the chart, brush and comparison compute everything from that series.

When to use

When not to use

Installation

Register both Xzero UI namespaces in your project's components.json:

{
  "registries": {
    "@xzero-ui": "https://mcp.xzero.co.uk/r/{name}.json",
    "@xzero-ui-pro": "https://mcp.xzero.co.uk/r/pro/{name}.json"
  }
}
npx shadcn@4.23.0 add @xzero-ui-pro/revenue-explorer

Install xzero-foundation once, and import @/components/xzero/foundation.css in your app root. No Xzero token is used by this snapshot. For sample portraits, photos, fonts, or logos, download https://mcp.xzero.co.uk/install-assets.mjs and run node xzero-install-assets.mjs <receiving-project>.

Usage

import { RevenueExplorer } from "@/components/xzero/blocks/revenue-explorer/revenue-explorer";

export default function AnalyticsPage() {
  return (
    <section>
      <RevenueExplorer />
    </section>
  );
}

API reference

RevenueExplorer

A monthly revenue chart with series toggles, a comparison mode, a hover scrubber and an overview brush that zooms the range. All figures derive from the seeded months in revenue-data.ts.

No props.

Keyboard interactions

KeysAction
Arrow keysOn the plot, step the scrubbed month. On the brush or its handles, move the window or one edge by a month.
Shift + Arrow keysMove the brush or a handle by three months.
Home / EndJump to the range start or end (plot), or to the timeline edges (brush).
EscapeClears the scrubbed month on the plot.

Accessibility

Motion

Responsive behavior

Performance

Notes for AI

Guidance for AI tools

Blocks are complete, self-contained screens with sample data. Replace the sample data and connect the callbacks described above. Follow the declared prop types and do not invent props. Keep keyboard access, reduced motion support, and both light and dark themes intact when adapting it.

Full library index: https://ui.xzero.co.uk/llms.txt

Browse all components