Feature Flags
Expose features to your users using feature flags.
Props#
Has#
| Prop | Type | Default | Description |
|---|---|---|---|
featurerequired | string | string[] | One or more flags to match. | |
| children | string | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...> | (({ flags }: { ... }) => ReactElement<...>) | Children will be rendered when the result is valid. | |
| exact | boolean | true | Match all or some flags. |
| fallback | string | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...> | Renders the result is invalid. | |
| not | boolean | Inverse matching, eg will be valid when no flags match. | |
| value | any | Match the supplied flags to this value. Matches all truthy values by default. |
FeaturesProvider#
| Prop | Type | Default | Description |
|---|---|---|---|
| children | string | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...> | ||
| value | FeaturesOptions |
Types#
FeaturesOptions#
| Prop | Type | Default | Description |
|---|---|---|---|
segmentsrequired | Segment[] | ||
| attr | UserAttributes |
Was this helpful?