Env Badge

Uppercase environment badge for production, staging or development, with production outlined in red so live systems stand out in dev tools and consoles.

src/registry/ui/env-badge.tsx/r/env-badge.json

Installation#

bash
npx shadcn@latest add @minidev/env-badge

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/env-badge.json

Usage#

tsx
import { EnvBadge } from "@/components/ui/env-badge"

export function Example() {
  return (
    <EnvBadge env="staging" />
  )
}

API reference#

EnvBadge props
PropTypeDefault
envkeyof typeof tones"development"
classNamestring-

Examples#

All Developer tool UI components for React

Learn more