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-buttonUsage
import { ProductHuntButton } from "@/components/producthunt-button"<ProductHuntButton slug="my-product" />Examples
API Reference
ProductHuntButton
PropType
Notes
- No token? No problem. Pass upvotes and
nameprops 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.