Components

Github Button (Radix UI)

A github button component with animated stars display effects.

Installation

pnpm dlx shadcn@latest add @toui/github-button

Examples

Outline

Separator

Sizes

API Reference

This component is built using Radix UI Slot and Motion primitives and includes the following custom props:

GithubButton

PropTypeDefault
variant 'default' | 'outline''default'
size 'md' | 'sm' | 'lg''md'
className string
roundStars booleanfalse
fixedWidth booleantrue
initialStars number0
starsClass string
targetStars number
separator booleanfalse
showStarIcon booleantrue
animationDuration number2
animationDelay number0
autoAnimate booleantrue
showGithubIcon booleantrue
filled booleanfalse
repoUrl string
label string'Star'
useInViewTrigger booleanfalse
inViewOptions UseInViewOptions{ once: true }
transition SpringOptions

Credits

We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking Accept, you agree to our use of cookies.
Learn more.