--- title: Feature Flags image: /images/user-guide/table-views/table.png --- Header Feature flags are used to hide experimental features. 對 Twenty 而言,它們設置在工作區層級而不是用戶層級。 ## Adding a new feature flag In `FeatureFlagKey.ts` add the feature flag: ```ts type FeatureFlagKey = | 'IS_FEATURENAME_ENABLED' | ...; ``` Also add it to the enum in `feature-flag.entity.ts`: ```ts enum FeatureFlagKeys { IsFeatureNameEnabled = 'IS_FEATURENAME_ENABLED', ... } ``` To apply a feature flag on a **backend** feature use: ```ts @Gate({ featureFlag: 'IS_FEATURENAME_ENABLED', }) ``` To apply a feature flag on a **frontend** feature use: ```ts const isFeatureNameEnabled = useIsFeatureEnabled('IS_FEATURENAME_ENABLED'); ``` ## Configure feature flags for the deployment 更改 `core.featureFlag` 表中的相應記錄: | iD | 鍵 | workspaceId | 值 | | -- | ------------------------ | ----------- | --- | | 隨機 | `IS_FEATURENAME_ENABLED` | WorkspaceID | `真` |