@plugdash/heartpost
The EmDash alternative to WP ULike
The lightest form of applause.
A heart counter backed by Cloudflare KV. One click, one count, no account needed. Ships HeartButton.astro with four variants and full CSS customisation.
one click, one count, no account
This is the default. No configuration.
Setup
-
Install and register
npm install @plugdash/heartpostimport heartpost from "@plugdash/heartpost" // in emdash plugins array: heartpost() -
Add to your layout
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
| prop | type | default | description |
|---|---|---|---|
post | EmDash content item | Required | |
variant | "circle" | "pill" | "inline" | "circle" | Visual style |
size | "sm" | "md" | "lg" | "md" | Size scale |
CSS custom properties
| token | description |
|---|---|
--plugdash-heart-color | Active colour |
--plugdash-heart-size | Icon size |
Components are intentionally simple. Copy src/HeartButton.astro
into your theme and modify freely - no upstream coupling.
Pairs well with
a heart and a share are different signals. Give readers both.