Skip to content
bahtuiv0.18.8

<baht-comments>

A record conversation: the thread, oldest first, and a composer. With allow-internal the composer can post an internal note (shown marked; the host keeps it from the requester). Submitting emits baht-submit with { body, internal } and clears the box.

Basic

<baht-comments allow-internal="true"></baht-comments>

<script>
  const el = document.querySelector('baht-comments');
  el.entries = [
    {
      "id": 1,
      "author": "Bob",
      "time": "14:44",
      "body": "Printer still jammed"
    },
    {
      "id": 2,
      "author": "Alice",
      "time": "14:50",
      "body": "Swapped the toner",
      "internal": true
    }
  ];
</script>
NameTypeDefaultDescription
entriesJSCommentEntry[][]{ id, author, time?, body, internal? }
allow-internalbooleanfalse
placeholderstring'Add a comment…'Composer placeholder
internal-labelstring'Internal note'
empty-messagestring'No comments yet.'
busybooleanfalseDisables posting
allowInternalbooleanfalseOffer internal notes in the composer
internalLabelstring'Internal note'Name of an internal note