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-adapterIn-process evaluator (segments, rollouts, conditions)
@flagkit/reactReact bindings for your app
@flagkit/web-sdkBrowser SDK — backend evaluates, segments stay private
@flagkit/node-sdkNode.js SDK — fetches flags+segments, evaluates client-side

Install

bash
pnpm add @flagkit/react

Flow (React / Web)

  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.