The @carbon/feature-flags provides a runtime-based feature flag system that
you can use to enable or disable preview features from Carbon or in your own
code.
To check if a feature flag is enabled, you can use the enabled function in
JavaScript:
In Sass, you would use the enabled function or mixin:
@use'@carbon/feature-flags';
// Return true if the flag is enabled@if feature-flags.enabled('feature-flag-name') {
//
}
@include enabled('feature-flag-name') {
// only include contents if the flag is enabled
}
We're always looking for contributors to help us fix bugs, build new features,
or help us improve the project documentation. If you're interested, definitely
check out our Contributing Guide!
This package uses IBM Telemetry to collect de-identified and anonymized metrics
data. By installing this package as a dependency you are agreeing to telemetry
collection. To opt out, see
Opting out of IBM Telemetry data collection.
For more information on the data being collected, please see the
IBM Telemetry documentation.