StarsCount() — ui Function Reference
Architecture documentation for the StarsCount() function in github-link.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 3661c3c7_2f61_c2c4_09b0_4aab096c7c05["StarsCount()"] 6c5b7866_6251_4799_d639_c6925eb7996d["github-link.tsx"] 3661c3c7_2f61_c2c4_09b0_4aab096c7c05 -->|defined in| 6c5b7866_6251_4799_d639_c6925eb7996d style 3661c3c7_2f61_c2c4_09b0_4aab096c7c05 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/components/github-link.tsx lines 22–38
export async function StarsCount() {
const data = await fetch("https://api.github.com/repos/shadcn-ui/ui", {
next: { revalidate: 86400 },
})
const json = await data.json()
const formattedCount =
json.stargazers_count >= 1000
? `${Math.round(json.stargazers_count / 1000)}k`
: json.stargazers_count.toLocaleString()
return (
<span className="text-muted-foreground w-fit text-xs tabular-nums">
{formattedCount}
</span>
)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does StarsCount() do?
StarsCount() is a function in the ui codebase, defined in apps/v4/components/github-link.tsx.
Where is StarsCount() defined?
StarsCount() is defined in apps/v4/components/github-link.tsx at line 22.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free