ValyroUI Русская версия

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

PropTypeDefault
repo *stringRepository as owner/name; the link goes to it unless href is given.
count *numberStar 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).
formatIntl.NumberFormatOptions{ notation: 'compact', maximumFractionDigits: 1 }How the count is written (default compact: 12.3K).
localestringLocale for the count (default: the ThemeProvider's, then the browser's).
rollOnViewbooleantrueRoll 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.
hoverScalenumber1.05Scale under a hovering mouse (default 1.05), as Button's hoverScale.
tapScalenumber0.95Scale while pressed (default 0.95), as Button's tapScale.
labelsPartial<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