v0.0.1 | React 19 ready

Feature flags
that just work

Type-safe feature flags for React. Built-in DevTools. Zero configuration. Ship with confidence.

Start Building
$ npm i @localflag/react
App.tsx
import { FeatureFlagProvider, useFeatureFlag } from '@localflag/react';

const flags = {
  darkMode: false,
  newUI: true,
} as const;

function App() {
  const isDark = useFeatureFlag('darkMode');

  return (
    <FeatureFlagProvider flags={flags}>
      <MyApp />
    </FeatureFlagProvider>
  );
}

Everything you need. Nothing you don't.

Type-Safe

Full TypeScript generics. Autocomplete your flags. Catch errors at compile time.

DevTools

Built-in floating panel. Toggle flags in real-time. No browser extension needed.

Keyboard First

Toggle DevTools with ⌘⇧F. Fast access without leaving your keyboard.

Documented Flags

Add descriptions to flags. See what each flag does right in the DevTools panel.

Persistent

Overrides saved to localStorage. Persist across sessions and page reloads.

Zero Config

Wrap your app with the provider. Use hooks. Ship. No complex setup required.

Quick Start
01

Define flags

const flags = {
  dark: false,
  beta: true,
};
02

Wrap your app

<FlagProvider
  flags={flags}>
  <App />
</FlagProvider>
03

Use the hook

const dark =
  useFeatureFlag('dark');
// boolean

Ready to ship
with confidence?

Start using feature flags in your React app today. Setup takes less than a minute.