Introducing shieldcn — README badges, shadcn style.

Check it out

GitHub Stars Button

Link button showing a GitHub repo's star count with the octocat icon.

Loading...

Installation

$ shadcn add @jalco/github-stars-button

Usage

import { GitHubStarsButton } from "@/components/github-stars-button"
<GitHubStarsButton owner="shadcn-ui" repo="ui" />

Examples

Variants

Default

Primary

Secondary

Outline

API Reference

GitHubStarsButton

PropType

Notes

  • ISR caching. Results cached for 1 hour via next.revalidate .
  • Pre-fetched stars. Pass the stars prop to skip the API call entirely.