Skip to content

    Browse components

    Like Pop

    Like button whose heart squashes, pops and bursts into particles while the count rolls up digit by digit.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/like-pop

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/like-pop.json

    Usage

    import { LikePop } from "@/components/ui/like-pop";
    
    <LikePop count={post.likes} liked={post.likedByMe} onChange={(liked) => toggleLike(post.id, liked)} />

    Props

    PropTypeDefaultDescription
    defaultLikedbooleanfalseInitial liked state when uncontrolled.
    countnumber128Likes from everyone else; your like adds one.
    colorstring"#f43f5e"Heart and burst color.
    particlesnumber10Particles per burst.
    labelstring"Like"Accessible label.
    likedReactNode—Controlled liked state, pair with onChange.
    onChangeReactNode—(liked, count) => void.
    classNamestring—Extra classes for the root element.