Introducing shieldcn — README badges, shadcn style.

Check it out

Release Badge

Live GitHub release badge showing latest tag, publish date, and pre-release indicator.

class-variance-authority
Loading...

Installation

$ shadcn add @jalco/release-badge

Usage

import { ReleaseBadge } from "@/components/release-badge"
<ReleaseBadge owner="vercel" repo="next.js" />

Async server component — fetches the latest GitHub release at build time, cached 1 hour via ISR.

Layouts

Inline

Compact pill showing the tag icon and version. The default layout.

Default

With date

Outline

Row

Segmented horizontal strip showing tag, release name, and publish date.

Row layout

Card

Feature card showing release tag, name, publish date, and asset count.

Card layout

API Reference

ReleaseBadge

PropType

Notes

  • ISR caching. Release data is cached for 1 hour via next.revalidate. Set GITHUB_TOKEN to raise the rate limit from 60 → 5,000 req/hr.
  • Pre-fetched data. Pass the data prop to skip the API call — useful for static builds or when fetching data separately.
  • Pre-release indicator. When the latest release is marked as a pre-release on GitHub, an amber "pre" badge appears automatically.