Variation

Also called: flag variation, feature flag variation

Last updated:

A variation is a value a feature flag can serve. A boolean flag has two variations, on and off; a multivariate flag defines several — strings, numbers, or JSON payloads — and each evaluation returns exactly one. The flag's rules, rollout, and default all resolve to a variation, and that value is what your code branches on.

Boolean and multivariate variations

The common case is a boolean flag with two variations, read through a helper like boolVariation. A multivariate flag has three or more — string, number, or JSON — which is what powers an A/B test with several arms, tiered limits per plan, or a config payload delivered as a flag. Each variation has a stable key, and evaluation serves one of them to each user.

How a variation is chosen

Evaluation works through the flag in order — prerequisites, then targeting rules, then any percentage rollout, then the fallthrough default — and every path ends at exactly one variation, returned with a reason explaining the choice. Sticky bucketing keeps a given user on the same variation across evaluations, so what they see stays stable as you ramp a rollout or run an experiment.

Want the full picture? Read the concept guide: What are feature flags? →

Try it in your own app

Free Solo plan covers 10 flags and 2 environments. No credit card, no demo call — sign up and ship.