Skip to content


Switch branches/tags

Latest commit

Co-authored-by: github-actions[bot] <github-actions[bot]>
ef5020f 1

Git stats


Failed to load latest commit information.


Add Feature Flags to your Next.js application with a single React Hook. This package integrates your Next.js application with HappyKit Flags. Create a free account to get started.

Key Features

  • written for Next.js
  • integrate using a simple useFlags() hook
  • only 2 kB gzipped size
  • extremely fast flag responses (~50ms)
  • supports server-side rendering and static site generation
  • supports middleware and edge functions
  • supports user targeting, custom rules and rollouts

Want to see a demo? HappyKit Flags Demo


See the full documentation for setup instructions and usage guides.


This is roughly what the usage of feature flags looks like once you're up and running.

// pages/index.js
import { useFlags } from "flags/client";

export default function IndexPage(props) {
  const flagBag = useFlags();

  return flagBag.flags.greeting === "dog"
    ? "Who's a good boye"
    : "Hello";

The self documenting examples at show how to use @happykit/flags for client-side, static and server-side rendering.

Full Tutorial

A full tutorial including setup instructions is published on