GitHub Star Button
A button component that displays the number of stars a GitHub repository has, with a dynamic animation effect.
Installation
Usage
1import { GitHubStarsButton } from '@/components/pumki-ui/buttons/github-star';1<GitHubStarsButton username="AnshSinghSonkhia" repo="pumki-ui" />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| inViewOnce? | boolean | true | Animate only the first time the button enters the viewport |
| inViewMargin? | string | 0px | Margin for viewport detection |
| inView? | boolean | false | Enable viewport-based animation |
| formatted? | boolean | false | Show compact number format (e.g. 1.2k) |
| transition? | object | { stiffness: 90, damping: 50 } | Spring animation config |
| repo | string | - | GitHub repository name |
| username | string | - | GitHub username or organization |
Last updated on