Vexil/Docs/Targeting & rollout
Dashboard

Targeting & rollout

Control who sees what — from fully off to 100% of users, with stable per-user results.

Per-environment toggle

Every flag has an independent on/off toggle for each environment on its detail page. You can keep a flag enabled in Staging while it's completely off in Production — perfect for QA testing before a launch.

Gradual rollout

Use a Gradual flag type to release to a percentage of your users. Set the rollout to 10% and only 1 in 10 users will see the feature. When you're confident, slide it up to 100%.

ts
// The SDK uses a stable hash of userId
// so the same user always gets the same result
const inRollout = await ff.evaluate<boolean>('new-dashboard', {
  userId: 'user_123',
  environment: 'production',
})
// → true for ~10% of users when rollout = 10
A rollout of 0% is equivalent to disabled. A rollout of 100% is the same as fully enabled.

Stable hashing

The SDK hashes your userId to determine which bucket a user falls into. This means the same user always gets the same value — they won't randomly flip between the old and new experience on different page loads.

Default values

Every flag has a configured default value per environment. If the SDK can't reach the Vexil API (network error, timeout), it returns this default value so your app keeps working normally.

Always set sensible defaults. For a boolean flag, the default should usually be false (old behaviour) so that a network outage doesn't accidentally enable half-finished features.
← PreviousFlag typesNext →Dependencies