Nostr Share Component

Usage

In the <head> tag
Note that you need to change the {VERSION} part as appropriate (e.g. 0.1.2).

Please check the version information here: badge

<script src="https://cdn.jsdelivr.net/npm/@konemono/nostr-share-component@{VERSION}/dist/nostr-share-component.min.js
"></script>
    

In the <body> tag

 <nostr-share></nostr-share>

Attributes

If all three of the above are empty, the title and URL of the current site will be shared.

Demo

simple
<nostr-share></nostr-share>
custom
type icon
            <nostr-share data-type="icon"  data-title="たいとる" data-url="https://example.com" data-text="さんぷるシェアテキスト" ></nostr-share>
          
type mini
<nostr-share data-type="mini" data-title="たいとる" data-url="https://example.com"  data-text="さんぷるシェアテキスト" ></nostr-share>
custom style
カスタム
            <nostr-share data-title="たいとる" data-url="https://example.com"  data-text="さんぷるシェアテキスト" style="
          font-weight: bold;
          color: white;
          background-color: rgb(0, 136, 255);
          border: none;
          border-radius: 4px;
          cursor: pointer;
          text-align: center;
          display: inline-block;
          transition: background-color 0.3s ease; 
          ">
              カスタム
            </nostr-share>