Components/GretTech/Heartbeat Sync

Heartbeat Sync

Two heartbeats on a heart monitor, each at its own rhythm. Hold the heart and they drift together until they beat as one line, then your message appears with the days you've been in sync.

v0

Installation

Full Setup guide

Install the component automatically via Shadcn CLI.

npx shadcn@latest add https://www.grettech.com/api/registry/heartbeat-sync

Props

PropTypeDefaultDescription
you
string"You"Your name, beside your heartbeat
them
string"Them"Their name, beside theirs
yourBpm
number68Your heart rate before you're in sync, in beats per minute
theirBpm
number86Their heart rate before you're in sync, in beats per minute
since
string-The day you met (YYYY-MM-DD): counts the days you've been in sync
holdSeconds
number3Seconds of holding the heart it takes to fall into sync
colors
[string, string]["#ff5d73", "#6c8cff"]Your line's colour, then theirs. In sync, the one line carries both
latch
booleantrueStay in sync after letting go. Off, the beats drift apart again
sound
booleanfalseA soft heartbeat with each beat once in sync. It starts with the hold, so browsers allow it
haptics
booleantruePhones vibrate with each beat once in sync (Android; iPhones ignore it)
hint
string"Hold to sync our heartbeats"Under the heart until you're in sync
onSync
() => void-Called when you fall into sync