Skip to content

NostrText Component

Renders "plaintext" (also known as NUML, "Nostr Unassuming Markup Language", described in NIP-27) content common to simple notes such as kind:1 and kind:1111, including special rendering for NIP-21 nostr:... references, wss:// relay URLs and pictures, audio, video and generic URLs.

Usage

html
<script src="https://cdn.jsdelivr.net/npm/nostr-web-components/dist/nostr-text.js"></script>
<nostr-text content="Hello #[0] and nostr:npub1..."></nostr-text>

Attributes

  • content: The text content to render with Nostr-specific formatting

Styling Parts

  • video: Video elements
  • audio: Audio elements
  • image: Image elements
  • reference: References to other notes/users
  • url: URL links
  • relay: Relay URLs

External Templates

This component does not support external templates.