`) — ephemeral, not saved to localStorage
- Reactive event system (`vibe-flags-changed` event)
- Full TypeScript support
- CSS-isolated toolbar via Shadow DOM (`all: initial`) — global page styles cannot bleed in
## Installation
CDN (recommended):
```html
```
npm:
```bash
npm install @vibe-flags/core
```
## React Integration
Import `useVibeFlags` and `VibeFlagsToolbar` from `@vibe-flags/core/react` (React 18+ required):
```tsx
import { useVibeFlags, VibeFlagsToolbar } from '@vibe-flags/core/react';
function App() {
const darkMode = useVibeFlags({ key: 'darkMode', type: 'boolean', default: false });
return (
<>
{darkMode ? 'Dark' : 'Light'}
>
);
}
```
- **`useVibeFlags(key)`** — subscribe to a pre-registered flag by key
- **`useVibeFlags(config)`** — register a flag from config and subscribe
- **`VibeFlagsToolbar`** — renders the floating toolbar; optional `position` prop (`'bottom-right'` | `'bottom-left'` | `'top-right'` | `'top-left'`)
- **`VibeFlagsBoolean`** — wraps ``; props: `name`, `description`, `value`, `default`, `children`
- **`VibeFlagsSelect`** — wraps ``; props: `name`, `description`, `default`, `children`
- **`VibeFlagsOption`** — wraps ``; props: `value`, `children`
## Documentation
- [Getting Started](/docs/getting-started)
- [Flag Types](/docs/configuration)
- [React Integration](/docs/react)
- [Components API](/api/components)
- [Store API](/api/store)
- [Types](/api/types)
- [Comparison with LaunchDarkly, Unleash, PostHog](/docs/comparison)
- [Playground — Boolean Flag](/playground/boolean-flag)
- [Playground — Select Flag](/playground/select-flag)
- [Full documentation for LLMs](/llms-full.txt)
## Source
- GitHub: https://github.com/Meldiron/vibe-flags
- npm: https://www.npmjs.com/package/@vibe-flags/core
- License: MIT