Skip to content

Flags-Kit

Type-safe feature flags for TypeScript and React.

What It Is

flags-kit is a code-first feature flag system.

You define:

  • context types
  • segments
  • flags

Then you evaluate them in process through the current adapter and consume them through the React SDK.

For most React apps, @flagkit/react is the only package you need to install directly.

Packages

PackagePurpose
@flagkit/coreTypes plus createFlag and createSegment
@flagkit/internal-adapterThe current in-process evaluator
@flagkit/reactReact bindings for your app

Install

bash
pnpm add @flagkit/react

Flow

  1. Define your app context.
  2. Define reusable segments.
  3. Define flags.
  4. Create the React SDK.
  5. Use useFlag and useSetContext in components.

Start Here

Built with VitePress. Released under the MIT License.