Introducing shieldcn — README badges, shadcn style.

Check it out

Product Hunt Button

Link button showing a Product Hunt post's upvote count with the PH cat icon.

class-variance-authority
Loading...

Installation

$ shadcn add @jalco/producthunt-button

Usage

import { ProductHuntButton } from "@/components/producthunt-button"
<ProductHuntButton slug="my-product" />

Examples

Variants

Default

Secondary

Outline

Ghost

API Reference

ProductHuntButton

PropType

Notes

  • No token? No problem. Pass upvotes and name props to skip the API call entirely — useful for static sites or when you already have the data.
  • ISR caching. Results cached for 1 hour via next.revalidate .
  • Graceful fallback. Returns nothing when the post doesn't exist or the token is missing — no broken UI.