@plugdash/heartpost

The EmDash alternative to WP ULike

The lightest form of applause.

320 words·2min read

A heart counter backed by Cloudflare KV. One click, one count, no account needed. Ships HeartButton.astro with four variants and full CSS customisation.

npm install @plugdash/heartpost
alphaGitHub
circle
pill
ghost

Every variant. The first is the default, no configuration.

Setup

  1. Install and register

    bash
    npm install @plugdash/heartpost
    js
    import heartpost from "@plugdash/heartpost"
    // in emdash plugins array:
    heartpost()
  2. Add to your layout

    astro
    import HeartButton from "@plugdash/heartpost/HeartButton.astro"
    
    <HeartButton post={post} />

After this, every post can show a heart count. The count is stored in KV and updates without a page refresh.

It looks right. But it's yours to change.

Props

proptypedefaultdescription
postEmDash content itemRequired
variant"circle" | "pill" | "inline""circle"Visual style
size"sm" | "md" | "lg""md"Size scale

CSS custom properties

tokendescription
--plugdash-heart-colorActive colour
--plugdash-heart-sizeIcon size

Components are intentionally simple. Copy src/HeartButton.astrointo your theme and modify freely - no upstream coupling.

Pairs well with

a heart and a share are different signals. Give readers both.

beta

Readers who want to share your work shouldn't have to work for it.

npm install @plugdash/sharepost
beta

Readers decide in three seconds. Give them a reason to stay.

npm install @plugdash/readtime
built with plugdash.dev