Vercel Flags is now in public beta

Authors

1 min read

Vercel Flags is a feature flag provider built into the Vercel platform. It lets you create and manage feature flags with targeting rules, user segments, and environment controls directly in the Vercel Dashboard.

The Flags SDK provides a framework-native way to define and use these flags within Next.js and SvelteKit applications, integrating directly with your existing codebase:

flags.ts
import { vercelAdapter } from "@flags-sdk/vercel"
import { flag } from 'flags/next';
export const showNewFeature = flag({
key: 'show-new-feature',
decide: () => false,
description: 'Show the new dashboard redesign',
adapter: vercelAdapter()
});

And you can use them within your pages like:

app/page.tsx
import { showNewFeature } from '~/flags';
export default async function Page() {
const isEnabled = await showNewFeature();
return isEnabled ? <NewDashboard /> : <OldDashboard />
;}

For teams using other frameworks or custom backends, the Vercel Flags adapter supports the OpenFeature standard, allowing you to combine feature flags across various systems and maintain consistency in your flag management approach:

app.ts
import { OpenFeature } from '@openfeature/server-sdk';
import { VercelProvider } from '@vercel/flags-core/openfeature';
// Set up the provider and client
await OpenFeature.setProviderAndWait(new VercelProvider());
const client = OpenFeature.getClient();
// Evaluate flags
const enabled = await client.getBooleanValue('show-new-feature');

Vercel Flags is priced at $30 per 1 million flag requests ($0.00003 per event), where a flag request is any request to your application that reads the underlying flags configuration. A single request evaluating multiple feature flags of the same source project still counts as one flag request.

Vercel Flags is now in beta and available to teams on all plans.

Learn more about Vercel Flags to get started with feature flag management.