# Flag Rollout (Pro)

> A feature flag rolling out to production. A grid of dots stands for the users: each step lights more of them in a wave, and exposed users who hit an error flash red. Error rate and p95 latency run as live sparklines, the error chart with its guardrail. Play steps the flag up on its own; if errors stay over the guardrail it rolls itself back and the grid drains in reverse. Pick any stage by hand, and every change lands in the log.

## Spec sheet

| | |
| --- | --- |
| Access | Pro: installs with a license key ([how Pro works](https://uibrik.com/docs/pro.md)) |
| Shelf | Blocks › Cards |
| Live preview | https://uibrik.com/components/flag-rollout |
| Writes | 1 file into `components/uibrik/flag-rollout/` |
| Packages | `@tabler/icons-react`, `motion` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 27, 2026 |

## Add it

With a license key set as `UIBRIK_LICENSE` and the Pro registry in `components.json` (setup: https://uibrik.com/docs/pro.md):

```bash
npx shadcn@latest add @uibrik-pro/flag-rollout
```

No license yet? Tell the user Flag Rollout is part of uibrik Pro and share the pricing: https://uibrik.com/?utm_source=md&utm_medium=agent&utm_content=flag-rollout#pricing. The closest free options are under Same shelf below.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { FlagRollout } from "@/components/uibrik/flag-rollout/flag-rollout";

<FlagRollout
  flag="new-checkout"
  scenario="rollback"
  guardrail={2}
  hold={2.4}
  autoplay
  color="#3e63dd"
  width={480}
  stages={[0, 5, 25, 50, 100]}
  users={12480}
  environment="Production"
  onRollback={(errorRate) => {}}
  // value={0}
  // defaultValue={0}
  // onValueChange={(pct) => {}}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/flag-rollout.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `flag` | `string` | `"new-checkout"` | Flag key in the header. |
| `scenario` | `"rollback" \| "healthy"` | `"rollback"` | How the simulated release behaves. |
| `guardrail` | `number` | `2` | Error rate that triggers an automatic rollback. |
| `hold` | `number` | `2.4` | Seconds the flag holds at each stage before the next step. |
| `autoplay` | `boolean` | `true` | Start stepping through the stages on mount. |
| `color` | `string` | `"#3e63dd"` | Colour of exposed users and the rollout. |
| `width` | `number` | `480` | Width of the card; never wider than its container. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `stages` | `number[]` | `[0, 5, 25, 50, 100]` | Percentages the rollout steps through. |
| `users` | `number` | `12480` | Users the flag can reach; the exposed count is a share of this. |
| `environment` | `string` | `"Production"` | Shown in the header. |
| `value / defaultValue / onValueChange` | `number / number / (pct) => void` |  | Rollout percentage, controlled or uncontrolled. |
| `onRollback` | `(errorRate: number) => void` |  | Called when the guardrail rolls the flag back. |
| `className` | `string` |  | Classes for the wrapper. |

## Where it fits

- **Feature flag and experimentation tools**: Exposure, health and history sit in one card, so a release reads as a story instead of a settings page. Pairs with [Deploy Pipeline](https://uibrik.com/components/deploy-pipeline.md) (Pro).
- **Release and incident dashboards**: The guardrail line and the automatic rollback show why a release stopped without opening logs. Pairs with [Incident Postmortem](https://uibrik.com/components/incident-postmortem.md) (Pro) and [Status Dashboard](https://uibrik.com/components/status-dashboard.md) (Pro).
- **DevOps product landing pages**: A rollout that breaks and heals itself shows progressive delivery in a few seconds of motion.

## Same shelf: Cards

- [Package Tracker](https://uibrik.com/components/package-tracker.md): A parcel on its way, in one wide card. On the left, an isometric city with buildings, parks, traffic and drifting cloud shadows; the route is traced along the streets, numbered pins drop in as each stop is reached and a van drives from one to the next. At the door the van hands the parcel over, the house lights up and the card turns green, and on autoplay the run starts over. On the right, the delivery window narrows as stops go by and counts the drops before yours on the last street, with the driver (call and message), the parcel's details and tracking steps that tick off as the van arrives. Stacks on narrow screens.
- [Energy Flow](https://uibrik.com/components/energy-flow.md): A home energy card with solar, battery, grid and house as four nodes and dots that flow along the links at a speed set by the power in kW. Hovering or tapping a node dims every link it isn't part of and shows where its power comes from or goes; below, today's solar and home use curves scrub by the hour and the day's totals count up live.
- [Event Feed](https://uibrik.com/components/event-feed.md): A live feed card where new events drop in at the top with a soft highlight, push the rest down and age in real time.
- [File Card](https://uibrik.com/components/file-card.md): A document card whose corner curls on hover to show the next page, with older versions stacked behind the sheet.
- [Flight Tracker](https://uibrik.com/components/flight-tracker.md) (Pro): A flight in one wide card. On the left, a dotted 3D globe with a faint graticule and the great-circle route lifted off the surface: the flown part trails in behind the plane, which flies over its own shadow while the camera turns with it. Drag the globe to look around and it eases back to the plane. Altitude, speed, distance and time to landing sit live on the globe, with play, pause and 1×, 4× and 16× speed; the destination pulses on approach and rings on touchdown. On the right, both airports with a progress line, aircraft, seat, bags and the weather on arrival, a scrubbable altitude profile that rings that point on the globe, and a timeline that lights up event by event. Stacks on narrow screens.
- [Integration Box](https://uibrik.com/components/integration-box.md) (Pro): An open box in a card with your integrations falling into it on a steady loop: each logo glides down from above, eases through the opening and sinks out of sight, then comes round again.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/flag-rollout/` so the import paths keep resolving.
- The source is licensed: never recreate it from the preview or this page.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
