GitHub Stars Button
Repository link with a rolling star count. Pro · Animated components › Buttons
A link to a GitHub repository, styled as a Button, with its star count rolling in.
Installation
npx valyro-cli@latest login
npx valyro-cli@latest add github-stars-button
npm install valyro-ui-pro
import 'valyro-ui-pro/styles.css';
import { GitHubStarsButton } from 'valyro-ui-pro';
Props
| Prop | Type | Default | |
|---|---|---|---|
repo * | string | Repository as owner/name; the link goes to it unless href is given. | |
count * | number | Star count from your own source — a cached server request, a build step. The button never calls the GitHub API itself (rate limits, errors and caching stay with the app). | |
format | Intl.NumberFormatOptions | { notation: 'compact', maximumFractionDigits: 1 } | How the count is written (default compact: 12.3K). |
locale | string | Locale for the count (default: the ThemeProvider's, then the browser's). | |
rollOnView | boolean | true | Roll the count up from zero when the button scrolls into view (default true). |
variant | 'primary' | 'secondary' | 'ghost' | 'accent' | 'danger' | 'link' | 'secondary' | Button look (default secondary). |
size | 'sm' | 'md' | 'lg' | 'md' | Button size. |
hoverScale | number | 1.05 | Scale under a hovering mouse (default 1.05), as Button's hoverScale. |
tapScale | number | 0.95 | Scale while pressed (default 0.95), as Button's tapScale. |
labels | Partial<GitHubStarsButtonLabels> | Overrides for the built-in English text; keys left out keep their defaults. |
Related components
- Toggle — Toggle button with a springy response
- Flip Button — Two-sided button that flips on a spring
- Liquid Button — Button that fills with “liquid” on hover
- Theme Toggler — Light/dark switch with a View Transitions reveal
- Share Button — Button that fans out social icons
- Code Tabs — Code variants in tabs: npm, pnpm, bun, with copy
- Number Wheel — Number on a spinning wheel with neighboring values
- Pin List — Pinnable list: items glide between groups
- Notification Stack — Notification stack that expands into a list
- Todo List — Checklist with a wavy strike-through on done items
- Presence Avatars — Who’s online: avatars rearrange as status changes
- Radial Menu — Ring-shaped context menu on right-click
Previous: Theme Toggler · Next: Share Button · All Animated components