LaunchDarkly makes feature flag creation easy. First, navigate to your feature flag dashboard and click "New". This will prompt you to create a feature flag.
In the "Create a feature flag" area, you can specify attributes for your new feature flag, including name, description, and type. These attributes help you manage the feature flag and customize it to your use case.
A. Name your feature flag
Give your feature flag a meaningful name
B. Specify a flag key
Specify the key that you will use to reference the flag in your code. You may customize the key to anything you like, so long as it does not duplicate an existing key.
C. Describe your flag
Provide a meaningful human-readable description of the flag. This will help your team members understand the flag's purpose.
D. Add tags
One or more labels to help you categorize the flag. This is especially helpful for managing flag permissions using custom roles. For example, you can tag a flag as "Marketing" and "DevOps", and then use these tags to determine who has read or write access for the flag.
E. Specify the flag type
Choose either boolean or multivariate for the flag type. A boolean flag has two variations
The type of variation value is detected automatically based on your input, and cannot be changed after the flag has been created. You will always have the option to return strings. You will specify the value for each variation (ex.
one-click-checkout) with the option to add a human-readable name and description.
"This is a permanent flag"
Mark the flag as permanent if you intend it to keep it in your code long-term (ex. a flag to enable maintenance mode). We will not prompt you to remove permanent flags, even if one variation has been rolled out to all of your users.
When you create a feature flag, the flag is scoped to the project. This means that all environments within a project have the same set of feature flags. The flag configuration settings are specific to each environment.
From the UI, you can select the project and environment where you'd like to update your flag configuration using the environment switcher at the top left corner of the screen:
You can also create a feature flag by cloning an existing flag. Go to the settings page of the flag you wish to clone and click clone this flag. When you clone a flag, LaunchDarkly will make a new flag and copy the full targeting configuration for all environments (including on/off state) from the original flag to the new flag.