NewVercel Flags is now available — connect your flags with the @flags-sdk/vercel adapter.

The feature flags toolkit

Flags SDK is a free, open-source library for using feature flags in Next.js and SvelteKit.

$npx skills add vercel/flags@flags-sdk
Try the Flags SDK
Set persistent flags for this page
Full-width callout at the top
Toggle between headline options for A/B testing
Keep it dithered

Using flags as code

The SDK sits between your application and the source of your flags, helping you follow best practices and keep your website fast.

🔴 Live TV: Match Update & Schedules - Jadwal Siaran Langsung

Works with any provider

Use any flag provider, or none at all. Flexible integrations for your projects.

🔴 Live TV: Match Update & Schedules - Jadwal Siaran Langsung

Effortless integration

Integrate with App Router, Pages Router, and Routing Middleware.

🔴 Live TV: Match Update & Schedules - Jadwal Siaran Langsung

Release strategically

Ideal for A/B testing and controlled rollouts. Experiment with confidence.

Effortless setup

With a simple declarative API to define and use your feature flags.

Read the Docs
flags.ts
import { flag } from 'flags/next';

export const exampleFlag = flag({
  key: 'example-flag',
  decide() {
    return Math.random() > 0.5;
  },
});
Declaring a flag
app/page.tsx
import { exampleFlag } from "../flags";

export default async function Page() {
  const example = await exampleFlag();

  return <div>Flag {example ? "on" : "off"}</div>;
}
Using a flag

Deploy your first flag today

Get Started
$npm i flags