Menu

Rolling Out a New Feature

Last updated February 12, 2026

This workflow creates a feature flag, wires it into your application, and progressively enables it across environments.

terminal
vercel flags add redesigned-checkout --kind boolean \
  --description "New checkout flow with streamlined steps"

Creating a boolean flag to gate the new checkout experience.

Each project gets SDK keys automatically when you create your first flag. Confirm they're in place:

terminal
vercel flags sdk-keys ls

The FLAGS environment variable contains your SDK keys. Pull it into your local .env.local:

terminal
vercel env pull
terminal
pnpm add flags @flags-sdk/vercel

Create a flag definition using the Flags SDK. The vercelAdapter reads the FLAGS environment variable automatically:

flags.ts
import { flag } from 'flags/next';
import { vercelAdapter } from '@flags-sdk/vercel';
 
export const redesignedCheckout = flag({
  key: 'redesigned-checkout',
  adapter: vercelAdapter(),
});

The flag returns false until you enable it in the dashboard.

app/checkout/page.tsx
import { redesignedCheckout } from '../../flags';
 
export default async function CheckoutPage() {
  const showRedesign = await redesignedCheckout();
 
  return showRedesign ? <NewCheckout /> : <OldCheckout />;
}
terminal
vercel deploy

Visit the preview URL to confirm the old checkout renders. The flag defaults to false since it hasn't been enabled yet.

Enable the flag progressively, starting with development:

terminal
vercel flags enable redesigned-checkout --environment development
terminal
vercel flags enable redesigned-checkout --environment preview
terminal
vercel flags enable redesigned-checkout --environment production
terminal
vercel deploy --prod

Visit the production URL to confirm the new checkout is live.


Was this helpful?

supported.