Flags within Flagsmith are a combination of:
- A Boolean value - the
- A String of text - the
You are free to use either the
Flag State, or the
Flag Value or a combination of both
Flag State and
Flag Value within the one flag.
This allows you to use Flagsmith in the multiple ways:
- Showing and hiding features in your application. E.g. Controlling a new User Interface element within your application using the boolean
- Configuring environment variables/keys in your application. E.g. Setting the database URL for your API using the String
Flag Value, or setting the Google Analytics API key in your front end.
- Configuring String values used within your application remotely. E.g. You might want to define different colour schemes for your application banner depending on the Environment.
If you provide a
Flag Value to a flag, this will always be included and returned within the Flagsmith SDKS and API, regardless of the boolean
Feature Flags and Remote Config
You can create a new feature flag by going to the Flags page and hitting the Create Feature button.
Flags default to On (true) or Off (false). You can also optionally store and override String and numerical (int and float) values.
You can toggle feature Boolean values or override Remote Config values on a per-Environment basis.