BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/Animate UI/components-buttons-github-stars

GitHub Stars Button

animate-ui/components-buttons-github-stars
FreeComponent

A clickable button that links to a GitHub repository and displays the number of stars.

Install it

npx shadcn@latest add https://animate-ui.com/r/components-buttons-github-stars.json

Source

registry/components/buttons/github-stars/index.tsxanimate-ui.com/r/components-buttons-github-stars.json
1import * as React from 'react';
2import { cva, type VariantProps } from 'class-variance-authority';
3import { StarIcon } from 'lucide-react';
4
5import {
6 Button as ButtonPrimitive,
7 type ButtonProps as ButtonPrimitiveProps,
8} from '@/components/animate-ui/primitives/buttons/button';
9import {
10 GithubStars,
11 GithubStarsIcon,
12 GithubStarsLogo,
13 GithubStarsNumber,
14 GithubStarsParticles,
15 type GithubStarsProps,
16} from '@/components/animate-ui/primitives/animate/github-stars';
17import { cn } from '@/lib/utils';
18
19const buttonVariants = cva(
20 "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[box-shadow,_color,_background-color,_border-color,_outline-color,_text-decoration-color,_fill,_stroke] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
21 {
22 variants: {
23 variant: {
24 default:
25 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',
26 accent: 'bg-accent text-accent-foreground shadow-xs hover:bg-accent/90',
27 outline:
28 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
29 ghost:
30 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
31 },
32 size: {
33 default: 'h-9 px-4 py-2 has-[>svg]:px-3',
34 sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
35 lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
36 },
37 },
38 defaultVariants: {
39 variant: 'default',
40 size: 'default',
41 },
42 },
43);
44
45const buttonStarVariants = cva('', {
46 variants: {
47 variant: {
48 default:
49 'fill-neutral-700 stroke-neutral-700 dark:fill-neutral-300 dark:stroke-neutral-300',
50 accent:
51 'fill-neutral-300 stroke-neutral-300 dark:fill-neutral-700 dark:stroke-neutral-700',
52 outline:
53 'fill-neutral-300 stroke-neutral-300 dark:fill-neutral-700 dark:stroke-neutral-700',
54 ghost:
55 'fill-neutral-300 stroke-neutral-300 dark:fill-neutral-700 dark:stroke-neutral-700',
56 },
57 },
58 defaultVariants: {
59 variant: 'default',
60 },
61});
62
63type GitHubStarsButtonProps = Omit<
64 ButtonPrimitiveProps & GithubStarsProps,
65// … truncated

What it pulls in

npm packages

  • lucide-react

Other registry items

  • @animate-ui/primitives-buttons-button
  • @animate-ui/primitives-animate-github-stars

Files it writes

  • registry/components/buttons/github-stars/index.tsx

Facts

Registry
Animate UI
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-04
Last confirmed
today

Go to the source

animate-ui.com imskyleen/animate-ui on GitHub Raw registry item This item as JSON

More from Animate UI

All 580 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Avatar Groupcomponents-animate-avatar-groupAnimate UIComponentsFree1 dep
Codecomponents-animate-codeAnimate UIComponentsFree1 dep
Code Tabscomponents-animate-code-tabsAnimate UIComponentsFree1 dep
Cursorcomponents-animate-cursorAnimate UIComponentsFreeno deps
GitHub Stars Wheelcomponents-animate-github-stars-wheelAnimate UIComponentsFree1 dep
Tabscomponents-animate-tabsAnimate UIComponentsFreeno deps
Tooltipcomponents-animate-tooltipAnimate UIComponentsFree1 dep
Bubble Backgroundcomponents-backgrounds-bubbleAnimate UIComponentsFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex