About
A control card for one feature flag with per-environment on/off switches, a percentage rollout slider and quick presets. It shows how many users are reached and tracks unsaved changes with Save and Reset.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Feature Flag Rollout Card to your project and fits it to your theme.
Code
How Feature Flag Rollout Card is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
// This is a file with a demo for your component
// That's what users will see in the preview
// Create new files in this directory to add more demos
"use client";
import * as React from "react";
import { Component, type RolloutEnvironment } from "@/components/ui/feature-flag-rollout-card";
const ENVIRONMENTS: RolloutEnvironment[] = [
{ id: "development", name: "Development", enabled: true, percentage: 100, users: 48 },
{ id: "staging", name: "Staging", enabled: true, percentage: 50, users: 320 },
{ id: "production", name: "Production", enabled: true, percentage: 10, users: 84200 },
];
export default function DemoOne() {
const [last, setLast] = React.useState<string>("");
return (
<div className="flex min-h-[640px] w-full flex-col items-center justify-center gap-4 bg-background px-4 py-10 text-foreground">
<Component
flagName="New checkout flow"
flagKey="checkout_v2"
description="Shows the one-page checkout to a share of customers."
environments={ENVIRONMENTS}
onSave={(envs) => setLast(envs.map((e) => e.name + " " + (e.enabled ? e.percentage + "%" : "off")).join(" · "))}
/>
{last && <p className="max-w-xl text-center text-xs text-muted-foreground">Saved: {last}</p>}
</div>
);
}








