What Is a Feature Toggle? Definition, Examples & Best Practices
Feature Toggle A feature toggle (also called a feature flag) is a mechanism that allows you to enable or disable a feature at runtime without deploying new code. Toggles decouple deployment (code reaches production) from release (users can access the feature). They come in several types: release toggles, experiment toggles, ops toggles, and permission toggles.
Why feature toggle matters
Feature toggles reduce deployment risk and enable progressive rollouts. You can deploy code to production, test it internally, enable it for 5% of users, measure impact, and then roll out to 100% or roll back instantly. This makes releases safer and more data-driven.
How it works
Wrap the feature code in a conditional check that queries a toggle management service (LaunchDarkly, Statsig, Unleash, or custom). The service returns whether the toggle is on or off for the current user. Toggles can be simple on/off, percentage-based (10% of users), or targeted (specific user segments).
Common mistakes
Not cleaning up old toggles (creates technical debt and code complexity)
Using too many toggles simultaneously (hard to reason about system behavior)
Not monitoring both code paths (the old path may break silently)
Using toggles for permanent configuration (toggles should be temporary)
Related terms
How Vantage relates
Vantage generates tickets that include rollout strategies with feature toggle recommendations. When the PRD specifies a gradual rollout, the generated tickets include toggle setup as an explicit task.