Feature toggle
Also called: feature flag, feature switch
Last updated:
A feature toggle is a switch in your code that turns a piece of functionality on or off while the application runs, with no new deploy. Same thing as a feature flag. Some teams say feature switch. Feature toggling means putting new or risky code behind one of these switches, so shipping it to users becomes a configuration change.
Feature toggle vs feature flag
toggle won't find a helper named isFlagOn.A feature toggle example
const showNewCheckout = client.boolVariation('new-checkout', { user_id: user.id }, false)
if (showNewCheckout) {
renderNewCheckout(cart)
} else {
renderLegacyCheckout(cart)
}The last argument is the fallback. Can't evaluate the toggle? Everyone stays on the old checkout. While you build, it's off in production and on in staging so QA can click through the new flow. Once it works you turn it on for your own team, then for 10% of users with a percentage rollout, and finally for everybody, and not one of those steps needs a deploy. After a few quiet weeks at 100%, delete the else branch and the toggle with it.The four kinds of toggle
Toggling a feature without a deploy
Feature toggles in Java, JavaScript and Python
What a feature toggle service does
Want the full picture? Read the concept guide: What are feature flags? →
Related terms
Feature flag
A feature flag is a conditional in your code whose value is controlled from a remote dashboard, letting you turn functionality on or off without deploying new code.
Dark launch
A dark launch ships a feature to production turned off or invisible to users, so the code runs in the live environment before anyone sees it. You reveal it later on your own schedule.
Kill switch
A kill switch is a feature flag used to disable functionality instantly in production: flip it off and every SDK stops running the risky code path within seconds, no redeploy required.
Try it in your own app
The Free plan covers 10 flags and 2 environments. No credit card, no demo call — sign up and ship.