Skip to content
caliper ui pro docs

Feature flags

Feature flags across environments: switch each on or off, roll out to a percentage, target with rules, see stale flags, and confirm every production change with how many people it reaches.

Pro

Feature flags

4 flags · changes reach running apps within 30 seconds.

Feature flags by environment
FlagDevelopmentStagingProduction
25%
50%

When to use

  • Release management and experimentation tools.
  • Internal admin for teams that ship behind flags.

When not to use

  • A user preference; use a switch in settings.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/feature-flags

Adds its 12 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

FeatureFlags

6 props
PropTypeDefaultDescription
flags *readonly FeatureFlag[]—
environments *readonly { id: string; name: string; production?: boolean | undefined; }[]—
attributesreadonly string[]["plan", "country", "email", "workspace"]What rules can match on.
monthlyUsersReadonly<Record<string, number>>—Active users per environment, to say how many people a rollout reaches.
onChange *(flag: FeatureFlag) => void | Promise<void>—
classNamestring—

Keyboard

  • Keyboard and focus come from Radix dialog, popover: arrow keys move through items, Enter and Space select, and Escape closes and returns focus.

Accessibility

It exposes region and status semantics, with aria-labelledby, aria-label, aria-expanded, aria-controls and aria-hidden kept in step with state. Changes that matter are announced through a live region.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/feature-flags.md

The index of every part is at /llms.txt.

More in Developer tools