Skip to main content
A feature is an individual flag or configuration value that lives inside a scope. Every user, team, or organization that your application serves will receive a feature’s value when it is queried — unless a more specific override applies. The default value is what Foff returns when no override matches.

Feature names

Feature names are slugs: lowercase, hyphen-separated identifiers. For example:
  • dark-mode-ui
  • max-upload-size
  • checkout-v2-enabled
  • rate-limit-per-minute
Feature names are case-sensitive. dark-mode-ui and Dark-Mode-UI are treated as two different features. Use a consistent naming convention across your scope to avoid confusion.

Supported value types

A feature’s default value — and any override value — can be any JSON-serializable type:
TypeExample
Booleanfalse, true
String"v2", "red"
Number100, 3.14
Object{"limit": 50, "unit": "mb"}
Choose the type that best fits how your application consumes the value. Boolean flags are the most common, but strings and objects let you ship full configuration payloads through the same system.

Creating a feature

1

Open a scope

In the Foff dashboard, navigate to Scopes and select the scope where you want to add the feature.
2

Add a feature

Click Add feature and enter a slug name — for example, dark-mode-ui.
3

Set the default value

Enter the default value that applies to all users unless overridden. For dark-mode-ui, set the default to false to keep dark mode off by default.
4

Save

Click Create. The feature is now live and queryable via the API or any Foff SDK.

Example: dark-mode-ui

After creation, your feature looks like this in the dashboard:
FieldValue
Namedark-mode-ui
Default valuefalse
OverridesNone (yet)
Any query for dark-mode-ui returns false until you add an override for a specific hierarchy path.

Next steps

Once you have a feature with a default value, you can add overrides to return a different value for specific hierarchy paths.

Overrides

Learn how to override a feature’s value for specific hierarchy levels.