Version Badge

Version badge that shows a v-prefixed release number with an optional stable, beta or canary channel pill, each tinted differently, for docs and changelogs.

src/registry/ui/version-badge.tsx/r/version-badge.json
v0.6.0stablev0.7.0beta

Channels

Installation#

bash
npx shadcn@latest add @minidev/version-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/version-badge.json

Usage#

tsx
import { VersionBadge } from "@/components/ui/version-badge"

export function Example() {
  return (
    <VersionBadge version="0.6.0" channel="stable" />
  )
}

API reference#

VersionBadge props
PropTypeDefault
version*string-
channel"stable" | "beta" | "canary"-
classNamestring-

* required

All Developer tool UI components for React

Learn more