Skip to content
caliper ui pro docs

Environment switcher

Switch between development, preview, staging and production from one control. Production is marked live everywhere it appears, and a notice above risky settings says so in words.

Pro
halden-app /

Settings below apply to staging only.

When to use

  • Developer platforms and admin consoles with several environments.
  • Settings that differ per environment.

When not to use

  • Switching workspaces or accounts; use the workspace switcher.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/environment-switcher

Adds its 3 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

EnvironmentSwitcher

5 props
PropTypeDefault
environments *readonly Environment[]—
value *string—
onValueChange *(id: string) => void—
labelstring"Environment"
classNamestring—

ProductionNotice

3 props
PropTypeDefault
namestring"Production"
detailstring"Changes here apply to live customers straight away."
classNamestring—

Keyboard

↓
Moves to the next item or value.
↑
Moves to the previous item or value.
Home
Jumps to the first item or the minimum.
End
Jumps to the last item or the maximum.
Enter
Activates the focused control.
Space
Activates the focused control.

Accessibility

It exposes listbox, option and note semantics, with aria-label, aria-hidden, aria-activedescendant and aria-selected kept in step with state.

Notes for AI

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

/docs/components/environment-switcher.md

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

More in Developer tools