nostr-zap

Embeddable zap buttons.

Minimal demo page for two experiences: a zap dialog (data-npub/data-note-id) and a zap viewer (data-nzv-id). Drop the script, add attributes, done.

npub nprofile note nevent naddr
Read the README
Try it

Profile: zap + view

Two buttons side-by-side: zap dialog + zap viewer for the same profile.

Note: zap + view

Zap a note and instantly view all zaps for that note.

Embed

Include the bundle and add the attributes to your buttons.

Copy script tag
<script src="./dist/nostr-zap.js"></script>

Button snippet

Minimal example of a “Zap” + “View” pair (you can style however you want).

Show HTML
<div style="display:inline-flex;gap:8px">
  <button data-npub="npub1..."
    data-relays="wss://relay.nostr.band,wss://relay.damus.io">
    Zap
  </button>
  <button data-nzv-id="npub1..."
    data-zap-color-mode="true"
    data-relay-urls="wss://relay.nostr.band,wss://relay.damus.io">
    View
  </button>
</div>