Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Google Cloud Stats Integration Block for React

An integration stats section for an event pipeline on Google Cloud: a gauge of how much of BigQuery's free query tier the dashboards used, three figures and the three biggest queries, all derived from typed data.

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

An integration stats section for React with Base UI, written for Ferrybase, a fictional tool that streams product events into BigQuery, and the free query tier of its Google Cloud project. A compact header says "0.72 TiB of your free query tier is used", with the mark pair behind a split divider at its end. Under a band rule, a framed gauge at the start: a tall bar on desktop and a horizontal one on a phone, from 0 to 1.5 TiB with ticks, the first TiB free and the rest hatched as the on-demand zone, filled to what was queried. At the end sit three figures (queried, left in the free tier, share of the free tier used) and the three biggest queries as rows with their table, the bytes they processed and a bar, then one row for the rest. Every figure, bar and the headline comes from the six typed queries, so changing one updates them all. The month and the queries are example data, and nothing is read from Google Cloud. The block has no state and ends on content, so no rule closes it. Google Cloud is named in text only: its lettermark tile is a neutral placeholder and no logo, colour or wordmark ships.

FAQ

Is the free tier figure real?

It is the rule BigQuery states: on-demand queries are billed by the bytes they process, and the first 1 TiB each month is free. The quantities in the block are example data, six typed queries in GiB, and nothing is fetched from Google Cloud. The free terabyte applies per billing account on Google's side, so a real figure would need to add up every project on the account.

Where do the numbers come from?

From the QUERIES list at the top of the file: a name, a table and the GiB each processed. The total, what is left, the share used, the TiB figure in the headline, the gauge's fill, the three biggest queries and the "other queries" row are all computed from it by small helpers. Add, remove or change a query and every figure follows. Edit FREE_GIB and SCALE_GIB if your free allowance or gauge range differ.

How is the gauge read without colour?

The gauge is a drawing hidden from assistive technology, and the caption under it says the same in words ("739 GiB of the 1,024 GiB free tier queried, 285 GiB to go"). It reads without colour: the filled part is solid, the on-demand zone is hatched, and a bold line marks where the free tier ends, with a label beside it. Below lg it lies down as a horizontal bar with the same ticks.

How do I use it for another service or product?

The product is PRODUCT and the service is SERVICE, a name and a two-letter mark for its lettermark tile, typed rather than worked out from the name. MarkTile draws either side and carries a comment where your own logo goes; never redraw a brand's logo. Rewrite the queries, the free allowance and the copy in your service's terms.

How does it fit a phone, right-to-left layouts and reduced motion?

Below lg the divider gives way to rules between the parts, which stack in reading order, and the gauge becomes horizontal. In a right-to-left layout the columns flip while the gauge, its ticks, numbers and table names keep their left-to-right order. The header fades up once on load, and not at all with reduced motion.

  • Pro

    An integration detail section for an event-loading tool connecting to Google Cloud: a header with the mark pair and Connect Google Cloud, three steps, a live project ID field, and an accordion of three IAM roles whose gcloud commands already carry the project ID typed, each with a Copy button.

  • Pro

    An integration list section for an event-loading tool connecting to Google Cloud: daily BigQuery partitions as rows in a fixed, focusable window seven rows tall, a 7 or 14 day choice, size and a bar worked out from the rows, and a working Backfill on the days that failed or arrived short.

  • Pro

    Google Cloud Grid Integration

    Switch and tick grids

    An integration grid section for an event-loading tool connecting to Google Cloud: four export tables as a two-by-two of cells, each with an indeterminate parent checkbox over its BigQuery columns, personal-data columns off by default, and a worked-out tally.

  • Pro

    An integration setup section for an event pipeline connecting to Google Cloud: a project ID that is checked as you type, four gcloud commands built around it, a key-file drop zone that never reads the file, a dataset and a location.

  • Pro

    AWS Stats Integration

    Bars and columns

    An integration stats section for a cloud cost tool reading from AWS: six region lanes on one 0 to 24 hour ruler showing how far each region's cost data runs behind, with a solid tick at the 6 hour agreement.

  • Pro

    A gateway usage table where each route shows calls, error rate, a p50-to-p99 latency range on one scale, and a bar for its share of the rate limit.