Feature Flags

Expose features to your users using feature flags.

Props#

Has#

PropTypeDefaultDescription
featurerequiredstring | string[]One or more flags to match.
childrenstring | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...> | (({ flags }: { ... }) => ReactElement<...>)Children will be rendered when the result is valid.
exactbooleantrueMatch all or some flags.
fallbackstring | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...>Renders the result is invalid.
notbooleanInverse matching, eg will be valid when no flags match.
valueanyMatch the supplied flags to this value. Matches all truthy values by default.

FeaturesProvider#

PropTypeDefaultDescription
childrenstring | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...>
valueFeaturesOptions

Types#

FeaturesOptions#

PropTypeDefaultDescription
segmentsrequiredSegment[]
attrUserAttributes

Was this helpful?