BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/PaceUI GSAP/github-star-counter

GitHub Star Counter

paceui-gsap/github-star-counter
FreeComponent

Display live GitHub star count for any public repository

Live preview

live · rendered by the registry
Rendered by PaceUI GSAP on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://gsap.paceui.com/r/github-star-counter.json

Source

components/gsap/github-star-counter.tsxgsap.paceui.com/r/github-star-counter.json
1"use client";
2
3import { useEffect, useState } from "react";
4
5import { RollingNumber } from "@/components/gsap/rolling-number";
6
7const fetchGitHubStars = async (repo: string): Promise<number> => {
8 const res = await fetch(`https://api.github.com/repos/${repo}`);
9 if (!res.ok) throw new Error("Failed to fetch repo info");
10
11 const data = await res.json();
12 return data.stargazers_count;
13};
14
15export const GithubStarCounter = ({
16 repo = "paceui/gsap",
17 defaultStar = "000",
18}: {
19 repo: string;
20 defaultStar?: number | string;
21}) => {
22 const [stars, setStars] = useState<number | string>(defaultStar);
23
24 useEffect(() => {
25 let isMounted = true;
26 fetchGitHubStars(repo).then((stars) => {
27 if (isMounted) setStars(stars);
28 });
29 return () => {
30 isMounted = false;
31 };
32 }, [repo]);
33
34 return (
35 <a
36 className="bg-card border-foreground/5 flex items-center gap-2 rounded-full border-2 px-3 transition-all"
37 href={`https://github.com/${repo}`}
38 target="_blank">
39 <svg viewBox="0 0 438.549 438.549" className="size-4.5">
40 <path
41 fill="currentColor"
42// … truncated

What it pulls in

Other registry items

  • @paceui-gsap/rolling-number

Files it writes

  • components/gsap/github-star-counter.tsx

Facts

Registry
PaceUI GSAP
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-01
Last confirmed
2 days ago

Go to the source

Docs on PaceUI GSAP gsap.paceui.com paceui/gsap on GitHub Raw registry item This item as JSON

More from PaceUI GSAP

All 29 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Modal Ability Selectorai-modal-ability-selectorPaceUI GSAPComponentsFree2 deps
Modal Selectorai-modal-selectorPaceUI GSAPComponentsFree2 deps
Response Writerai-response-writerPaceUI GSAPComponentsFree2 deps · 2 files
AI Suggestionsai-suggestionsPaceUI GSAPComponentsFree2 deps
Modal Ability Selectorai-token-counterPaceUI GSAPComponentsFree2 deps
Animated Stackanimated-stackPaceUI GSAPComponentsFree2 deps
Bouncing Textbouncing-textPaceUI GSAPComponentsFree2 deps
Dot Flowdot-flowPaceUI GSAPComponentsFree2 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex