TidalUI

Feature flags preview

Edit explicit feature values and rollout percentages across named environments.

pro · Blocks · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/feature-flag-manager

Import components/ui/tidal.css, components/ui/feature-flag-manager.css. Wrap installed components in tidal-scope.

Preview

Feature flags component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/feature-flag-manager.css";
import{TidalFeatureFlagManager}from"./components/ui/feature-flag-manager";
export default(p:Parameters<typeof TidalFeatureFlagManager>[0])=><div className="tidal-scope"><TidalFeatureFlagManager {...p}/></div>;

API and props

TidalFeatureFlagManager.environmentId (required)
string

Required environment id value accepted by this exported component.

TidalFeatureFlagManager.environments (required)
ReadonlyArray<TidalFlagEnvironment>

Required environments value accepted by this exported component.

TidalFeatureFlagManager.flags (required)
ReadonlyArray<TidalFeatureFlag>

Required flags value accepted by this exported component.

TidalFeatureFlagManager.onEnvironmentChange (required)
(id: string) => void

Callback invoked when the environment change interaction is proposed.

TidalFeatureFlagManager.onFlagChange (required)
(id: string, value: TidalFlagValue, source: "enabled" | "rollout") => void

Callback invoked when the flag change interaction is proposed.

TidalFeatureFlagManager.title (required)
ReactNode

Required title value accepted by this exported component.

TidalFeatureFlagManager.description
ReactNode

Optional description value accepted by this exported component.

TidalFeatureFlagManager.disabled
boolean | undefined

Optional disabled value accepted by this exported component.

TidalFeatureFlagManager.environmentRef
Ref<HTMLSelectElement> | undefined

Optional environment ref value accepted by this exported component.

TidalFeatureFlagManager.headingLevel
"h2" | "h3" | "h4" | "h5" | undefined

Optional heading level value accepted by this exported component.

TidalFeatureFlagManager.labels
Partial<{ environment: string; enabled: string; rollout: string; empty: string; invalid: string; invalidRollout: string; }> | undefined

Optional labels value accepted by this exported component.

TidalFeatureFlagManager.rolloutRef
((flag: TidalFeatureFlag) => Ref<HTMLInputElement> | undefined) | undefined

Optional rollout ref value accepted by this exported component.

TidalFeatureFlagManager.switchRef
((flag: TidalFeatureFlag) => Ref<HTMLInputElement> | undefined) | undefined

Optional switch ref value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas