feature-flag-visibility

Gate presentational component containers behind optional feature flags.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/thinkeloquent/mta-ui-atomicdesign-organisms --skill feature-flag-visibility
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: feature-flag-visibility
Source: https://github.com/thinkeloquent/mta-ui-atomicdesign-organisms/tree/main/.claude/skills/feature-flag-visibility
Command: npx skills add https://github.com/thinkeloquent/mta-ui-atomicdesign-organisms --skill feature-flag-visibility

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Gate the top-level container of presentational components behind an optional feature flag so they render nothing when the flag is false, enabling runtime visibility control and safer scaffolding across atoms, molecules, and organisms.

Core Features & Use Cases

  • Expose featureFlag and optional featureFlagFallback props to control visibility at render time.
  • Use the central useFeatureFlag hook and a provider to swap in LaunchDarkly, GrowthBook, or test stubs without changing components.
  • Provide a wrapper component for gating third-party content with a simple name-based flag.

Quick Start

Wrap your presentational component with the featureFlag prop or the FeatureFlag wrapper and supply a featureFlagFallback to render when the flag is off.

Frequently Asked Questions about feature-flag-visibility

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I gate React component visibility with feature flags?

You can gate React component visibility by passing a featureFlag prop to presentational components, rendering nothing when the flag is false. This enables runtime visibility control across atoms, molecules, and organisms without modifying component logic.

What is the best way to control UI rendering at runtime in React?

Controlling UI rendering at runtime involves gating top-level containers behind feature flags. Using a central hook with a provider allows you to swap flag sources like LaunchDarkly or GrowthBook without changing individual component implementations.

Can I use feature flags in React without a provider mounted?

Yes, feature flags default to visible when no provider is mounted. This fallback behavior ensures components render normally in isolation or test environments where a feature flag provider is not explicitly configured.

How do I test React components that are gated by feature flags?

Testing gated React components uses the central hook with a test stub provider to simulate flag states. You supply featureFlagFallback content to verify rendering behavior when flags are off, ensuring safer scaffolding during test execution.

Does this feature flag hook work with LaunchDarkly and GrowthBook?

Yes, the feature flag hook works with LaunchDarkly and GrowthBook through a central provider. You swap flag sources via the provider without altering component code, maintaining consistent visibility gating across different feature flag services.

Why should I gate third-party content with a feature flag wrapper?

Gating third-party content with a feature flag wrapper controls external rendering using a simple name-based flag. This prevents unauthorized or untested external components from displaying until their corresponding feature flag is explicitly enabled.