Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Feature Flag Eligibility Error Block for React

A full-height page for a feature that is not on for your workspace yet: three conditions ruled from rail to rail, a rollout meter with the next wave, and a Switch that joins early access and flips the last condition.

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

Explain why a feature isn't there, and what would put it there, with this feature flag block for React with Base UI. It's the page a Gaugework customer sees for advanced analytics: the page's rails run its full height and one band crosses the screen. The mark, the heading and one sentence come first, then rows ruled from rail to rail, each with a plus mark at both ends, list the three conditions for being in a rollout wave (plan, region, the early-access list), each with a shape and the word "Met" or "Not met". A Switch, "Join early access", flips the last one to met and a polite line says when to expect the feature. Under it a Progress meter says the feature is on for 35% of workspaces and outlines the next wave, which fills in when you join. A Shine Button, the only colored control, goes back to the dashboard; on a phone it is pinned to the foot of the screen. It's built from Switch, Progress, Shine Button and Guides, with a CSS entrance only. For beta programs, staged rollouts and plan-gated features.

FAQ

Where do the conditions come from?

From the typed RULES list and a function, metOf, that says whether each is met. In your app, evaluate the same conditions on the server (plan, region, a list membership) and pass the results in. The page never decides who gets a feature: the flag service does, and this page only explains its answer, so show the real reasons and not a generic "not available".

What does Join early access do?

It flips the third condition to met, turns the count to "All three conditions are met", fills the next wave on the meter and says "On the list: you'll see it in the next wave, about two weeks". It is a real Switch: Space toggles it, turning it off takes you back off the list, and the status line is a polite live region present from load. Nothing is saved: wire the Switch to an endpoint that adds the workspace to your list.

What does the meter show?

The solid part is the share of workspaces the feature is on for (35%); the dashed part is the next wave (20% more). Both are typed in ON_NOW and NEXT_WAVE, and the text beside the bar says the same, since the bar is decorative. Don't promise a date a rollout can't keep: the sentence says "about two weeks" because that is an estimate.

Why shapes and words instead of green and red?

A met condition is a check in a circle with the word "Met", and an unmet one a cross in a circle with "Not met", so the page reads the same for people who can't tell colors apart and in every theme. Nothing here is red or green.

How does it look on a phone?

The conditions stack with their words at the end, the Switch and the meter follow, and Back to dashboard stays pinned at the foot of the screen so it is always on the first screen, then sits in the flow from the small breakpoint.

  • Pro

    A full-height holding page for a marketplace that is not open yet: an email form that checks itself and notes the address in place, beside the four phases of the build as a vertical Steps with a bar for the schedule.

  • Pro

    A full-height page for a web app tab running a retired version: a ruler of five releases with the supported range shaded and You are here marked, a radio group to read each release, three changes in 5.0 and a reload button.

  • Pro

    A full-height maintenance page for an online bank that shows a five-segment progress bar with the window's start and expected return, and a Check again button that reports a typed result.

  • Pro

    A full-height status page for cloud storage moving an account between regions: a drawn move whose dashes run three cycles, and an accordion of five steps that each say what they do and what stays available.

  • Pro

    A banner stack in an on-call console window: a critical banner that cannot be dismissed, a warning and an info banner that fold away, and a Dismissed row that restores them, in a window that never changes height.

  • Pro

    Subscription Required Error

    Plans and checkout

    A full-screen 403 for a feature the plan does not include: the facts, what Pro adds, and an editable message that asks the workspace owners, with a Viewing as demo control that turns the ask into an upgrade with the price worked out.