Control feature visibility with flags, percentage rollouts, and user targeting. Start with local JSON flags and upgrade to a remote provider when ready.
File-based feature flags with no external dependencies
Check a feature flag
Gate features behind flags with type-safe checks
import { flags } from '@/lib/flags'
export default function Dashboard() {
const showNewChart = flags.isEnabled('new-dashboard-chart')
return (
<div>
<h1>Dashboard</h1>
{showNewChart ? <NewChart /> : <LegacyChart />}
</div>
)
}Add feature flags to your Primstack project with a single command:
prim flags init