Atlassian Design System JS behaviour

Comment Thread

Round avatar, author and timestamp, rich body and a quiet action row — the heartbeat of every Jira issue and Confluence page conversation.

Documentation

Real scenarios

The component as it is used in a product — not a specimen grid.

Where the issue actually gets decided

Hearts count for real, Reply opens the inline composer, and what you send lands as a threaded reply — the whole conversation loop, alive.

NABU-241 Payment webhook

Maryam Rezaei
Label set to in-progress. @Ali move it to review once the checkout check passes — the secret is now nabu_live_9f2c…
Ali Kazemi
Checkout is green in staging — moving it now.
Sara Moradi · edited
Docs updated: the retry is 5 attempts with a 30s backoff, not 3.

Compact and resolved

The same anatomy at half the height for dense threads — and the resolved badge that closes a discussion without deleting it.

compact
Sara Moradi
Docs updated — retries are 5×30s now.
resolved
Ali Kazemi Resolved
Rotated the secret on staging and production — keeping this thread for the audit log.

Important props

Important props
Prop Type Default What it does
avatar element null A 24–32px avatar; name initials work just as well.
author · time slots null The bold linked name in blue with the muted time beside it.
actions slot null The quiet text actions under the body; like react and reply.

Snippet

<article class="atcm">
    <span class="atcm-avatar" aria-hidden="true">SA</span>
    <div>
        <header><a href="#">Selin Aydin</a><time>2 hours ago</time></header>
        <div class="atcm-body">
            <p>I set the label to “In progress”; <a href="#">@Milan</a> move it to review once the audit passes.</p>
        </div>
        <footer>
            <button>Reply</button><button>React</button>
        </footer>
    </div>
</article>

<style>
.atcm { display: flex; gap: 12px; padding: 12px 0; }
.atcm-avatar { flex: none; display: grid; place-items: center; inline-size: 32px;
               aspect-ratio: 1; border-radius: 50%; background: #F1F2F4;
               font: 600 12px Inter, system-ui; color: #44546F; }
.atcm header { display: flex; align-items: baseline; gap: 8px; }
.atcm header a { font: 600 14px Inter, system-ui; color: #0C66E4; }
.atcm time { font: 400 12px Inter, system-ui; color: #626F86; }
.atcm-body p { margin: 4px 0; font: 400 14px/1.6 Inter, system-ui; color: #172B4D; }
.atcm footer { display: flex; gap: 4px; }
.atcm footer button { border: none; background: none; padding: 4px 8px;
                      border-radius: 3px; font: 600 12px Inter, system-ui; color: #626F86; }
</style>
// app/Pages/Issue.jsx — Inertia page; renders the React snippet
// below unchanged, with Inertia's Link wired into the provider.
import { Link } from '@inertiajs/react';
import { NabuXUIProvider } from '@nabuxai/ui-react';
import IssueComments from '@/components/IssueComments';

export default function Issue() {
  return (
    <NabuXUIProvider locale="en" linkComponent={Link}>
      <main className="nx-page">
        <IssueComments />
      </main>
    </NabuXUIProvider>
  );
}
// IssueComments.jsx — the conversation heartbeat of every Jira issue
import { useState } from 'react';
import '@nabuxai/ui-core/css';

export default function IssueComments() {
  const [likes, setLikes] = useState(3);
  const [liked, setLiked] = useState(false);
  const [replying, setReplying] = useState(false);
  const [draft, setDraft] = useState('');
  const [replies, setReplies] = useState([]);

  const send = () => {
    const body = draft.trim();
    if (!body) return;
    setReplies((r) => [...r, { author: 'Milan Novak', body }]);
    setDraft('');
    setReplying(false);
  };

  return (
    <>
      <style>{`
        .atcm-thread { max-inline-size: 26rem; border: 1px solid #DFE1E6; border-radius: 6px; background: #fff;
                       padding: 1rem 1.1rem; font-family: Inter, system-ui, sans-serif; }
        .atcm { display: flex; gap: .65rem; padding-block: .45rem; }
        .atcm-av { flex: none; display: grid; place-items: center; inline-size: 2rem; aspect-ratio: 1;
                   border-radius: 50%; background: #F1F2F4; font: 600 .72rem Inter, system-ui; color: #44546F; }
        .atcm-main { flex: 1; min-inline-size: 0; }
        .atcm-head { display: flex; align-items: baseline; gap: .5rem; }
        .atcm-head a { font: 600 .82rem Inter, system-ui; color: #0C66E4; text-decoration: none; }
        .atcm-head time { font: 400 .7rem Inter, system-ui; color: #626F86; }
        .atcm-body { margin: .2rem 0 .1rem; font: 400 .82rem/1.65 Inter, system-ui; color: #172B4D; }
        .atcm-body a { color: #0C66E4; font-weight: 500; text-decoration: none; }
        .atcm-actions { display: flex; gap: .25rem; }
        .atcm-actions button { display: inline-flex; gap: .3rem; border: none; background: none;
                               padding: .25rem .45rem; border-radius: 3px; cursor: pointer;
                               font: 600 .72rem Inter, system-ui; color: #626F86; }
        .atcm-actions button:hover { background: #F1F2F4; color: #0C66E4; }
        .atcm-actions button[aria-pressed='true'] { color: #0C66E4; }
        .atcm-replies { margin-inline-start: 1rem; padding-inline-start: .85rem;
                        border-inline-start: 2px solid #DFE1E6; }
        .atcm-form { display: flex; gap: .65rem; padding-block: .55rem; }
        .atcm-form textarea { flex: 1; min-block-size: 2.5rem; padding: .5rem .6rem; border: 1px solid #DFE1E6;
                              border-radius: 4px; font: 400 .8rem/1.55 Inter, system-ui; }
        .atcm-send { align-self: flex-start; block-size: 1.85rem; padding-inline: .75rem; border: none;
                     border-radius: 3px; cursor: pointer; background: #0C66E4; color: #fff;
                     font: 500 .76rem/1 Inter, system-ui; }
      `}</style>
      <div className="atcm-thread">
        <article className="atcm">
          <span className="atcm-av" aria-hidden="true">SA</span>
          <div className="atcm-main">
            <header className="atcm-head"><a href="#">Selin Aydin</a><time>2 hours ago</time></header>
            <div className="atcm-body">
              I set the label to “In progress”; <a href="#">@Milan</a> move it to review once the audit passes.
            </div>
            <div className="atcm-actions">
              {/* The heart really counts. */}
              <button type="button" aria-pressed={liked}
                onClick={() => { setLiked(!liked); setLikes((n) => n + (liked ? -1 : 1)); }}>
                ♥ {likes}
              </button>
              <button type="button" onClick={() => setReplying(!replying)}>Reply</button>
            </div>
            {replies.length > 0 && (
              <div className="atcm-replies">
                {replies.map((r, i) => (
                  <article className="atcm" key={i}>
                    <span className="atcm-av" aria-hidden="true">MN</span>
                    <div className="atcm-main">
                      <header className="atcm-head"><a href="#">{r.author}</a><time>just now</time></header>
                      <div className="atcm-body">{r.body}</div>
                    </div>
                  </article>
                ))}
              </div>
            )}
            {replying && (
              <div className="atcm-form">
                <textarea value={draft} placeholder="Add a reply…" autoFocus
                  onChange={(e) => setDraft(e.target.value)} />
                <button type="button" className="atcm-send" onClick={send}>Send</button>
              </div>
            )}
          </div>
        </article>
      </div>
    </>
  );
}
<!-- IssueComments.vue — the conversation heartbeat of every Jira issue -->
<script setup lang="ts">
import { ref } from 'vue';
import '@nabuxai/ui-core/css';

const likes = ref(3);
const liked = ref(false);
const replying = ref(false);
const draft = ref('');
const replies = ref<Array<{ author: string; body: string }>>([]);

function toggleLike() {
  liked.value = !liked.value;
  likes.value += liked.value ? 1 : -1;
}
function send() {
  const body = draft.value.trim();
  if (!body) return;
  replies.value.push({ author: 'Milan Novak', body });
  draft.value = '';
  replying.value = false;
}
</script>

<template>
  <div class="atcm-thread">
    <article class="atcm">
      <span class="atcm-av" aria-hidden="true">SA</span>
      <div class="atcm-main">
        <header class="atcm-head"><a href="#">Selin Aydin</a><time>2 hours ago</time></header>
        <div class="atcm-body">
          I set the label to “In progress”; <a href="#">@Milan</a> move it to review once the audit passes.
        </div>
        <div class="atcm-actions">
          <!-- The heart really counts. -->
          <button type="button" :aria-pressed="liked" @click="toggleLike">♥ {{ likes }}</button>
          <button type="button" @click="replying = !replying">Reply</button>
        </div>
        <div v-if="replies.length" class="atcm-replies">
          <article v-for="(r, i) in replies" :key="i" class="atcm">
            <span class="atcm-av" aria-hidden="true">MN</span>
            <div class="atcm-main">
              <header class="atcm-head"><a href="#">{{ r.author }}</a><time>just now</time></header>
              <div class="atcm-body">{{ r.body }}</div>
            </div>
          </article>
        </div>
        <div v-if="replying" class="atcm-form">
          <textarea v-model="draft" placeholder="Add a reply…" autofocus />
          <button type="button" class="atcm-send" @click="send">Send</button>
        </div>
      </div>
    </article>
  </div>
</template>

<style scoped>
.atcm-thread { max-inline-size: 26rem; border: 1px solid #DFE1E6; border-radius: 6px; background: #fff;
               padding: 1rem 1.1rem; font-family: Inter, system-ui, sans-serif; }
.atcm { display: flex; gap: .65rem; padding-block: .45rem; }
.atcm-av { flex: none; display: grid; place-items: center; inline-size: 2rem; aspect-ratio: 1;
           border-radius: 50%; background: #F1F2F4; font: 600 .72rem Inter, system-ui; color: #44546F; }
.atcm-main { flex: 1; min-inline-size: 0; }
.atcm-head { display: flex; align-items: baseline; gap: .5rem; }
.atcm-head a { font: 600 .82rem Inter, system-ui; color: #0C66E4; text-decoration: none; }
.atcm-head time { font: 400 .7rem Inter, system-ui; color: #626F86; }
.atcm-body { margin: .2rem 0 .1rem; font: 400 .82rem/1.65 Inter, system-ui; color: #172B4D; }
.atcm-body a { color: #0C66E4; font-weight: 500; text-decoration: none; }
.atcm-actions { display: flex; gap: .25rem; }
.atcm-actions button { display: inline-flex; gap: .3rem; border: none; background: none;
                       padding: .25rem .45rem; border-radius: 3px; cursor: pointer;
                       font: 600 .72rem Inter, system-ui; color: #626F86; }
.atcm-actions button:hover { background: #F1F2F4; color: #0C66E4; }
.atcm-actions button[aria-pressed='true'] { color: #0C66E4; }
.atcm-replies { margin-inline-start: 1rem; padding-inline-start: .85rem;
                border-inline-start: 2px solid #DFE1E6; }
.atcm-form { display: flex; gap: .65rem; padding-block: .55rem; }
.atcm-form textarea { flex: 1; min-block-size: 2.5rem; padding: .5rem .6rem; border: 1px solid #DFE1E6;
                      border-radius: 4px; font: 400 .8rem/1.55 Inter, system-ui; }
.atcm-send { align-self: flex-start; block-size: 1.85rem; padding-inline: .75rem; border: none;
             border-radius: 3px; cursor: pointer; background: #0C66E4; color: #fff;
             font: 500 .76rem/1 Inter, system-ui; }
</style>
<!-- IssueComments.svelte — the conversation heartbeat of every Jira issue -->
<script lang="ts">
  import '@nabuxai/ui-core/css';

  let likes = $state(3);
  let liked = $state(false);
  let replying = $state(false);
  let draft = $state('');
  let replies = $state<Array<{ author: string; body: string }>>([]);

  function toggleLike() {
    liked = !liked;
    likes += liked ? 1 : -1;
  }
  function send() {
    const body = draft.trim();
    if (!body) return;
    replies.push({ author: 'Milan Novak', body });
    draft = '';
    replying = false;
  }
</script>

<div class="atcm-thread">
  <article class="atcm">
    <span class="atcm-av" aria-hidden="true">SA</span>
    <div class="atcm-main">
      <header class="atcm-head"><a href="#/profile/selin">Selin Aydin</a><time>2 hours ago</time></header>
      <div class="atcm-body">
        I set the label to “In progress”; <a href="#/profile/milan">@Milan</a> move it to review once the audit passes.
      </div>
      <div class="atcm-actions">
        <!-- The heart really counts. -->
        <button type="button" aria-pressed={liked} onclick={toggleLike}>♥ {likes}</button>
        <button type="button" onclick={() => (replying = !replying)}>Reply</button>
      </div>
      {#if replies.length > 0}
        <div class="atcm-replies">
          {#each replies as r, i (i)}
            <article class="atcm">
              <span class="atcm-av" aria-hidden="true">MN</span>
              <div class="atcm-main">
                <header class="atcm-head"><a href="#/profile/milan">{r.author}</a><time>just now</time></header>
                <div class="atcm-body">{r.body}</div>
              </div>
            </article>
          {/each}
        </div>
      {/if}
      {#if replying}
        <div class="atcm-form">
          <textarea bind:value={draft} placeholder="Add a reply…"></textarea>
          <button type="button" class="atcm-send" onclick={send}>Send</button>
        </div>
      {/if}
    </div>
  </article>
</div>

<style>
.atcm-thread { max-inline-size: 26rem; border: 1px solid #DFE1E6; border-radius: 6px; background: #fff;
               padding: 1rem 1.1rem; font-family: Inter, system-ui, sans-serif; }
.atcm { display: flex; gap: .65rem; padding-block: .45rem; }
.atcm-av { flex: none; display: grid; place-items: center; inline-size: 2rem; aspect-ratio: 1;
           border-radius: 50%; background: #F1F2F4; font: 600 .72rem Inter, system-ui; color: #44546F; }
.atcm-main { flex: 1; min-inline-size: 0; }
.atcm-head { display: flex; align-items: baseline; gap: .5rem; }
.atcm-head a { font: 600 .82rem Inter, system-ui; color: #0C66E4; text-decoration: none; }
.atcm-head time { font: 400 .7rem Inter, system-ui; color: #626F86; }
.atcm-body { margin: .2rem 0 .1rem; font: 400 .82rem/1.65 Inter, system-ui; color: #172B4D; }
.atcm-body a { color: #0C66E4; font-weight: 500; text-decoration: none; }
.atcm-actions { display: flex; gap: .25rem; }
.atcm-actions button { display: inline-flex; gap: .3rem; border: none; background: none;
                       padding: .25rem .45rem; border-radius: 3px; cursor: pointer;
                       font: 600 .72rem Inter, system-ui; color: #626F86; }
.atcm-actions button:hover { background: #F1F2F4; color: #0C66E4; }
.atcm-actions button[aria-pressed='true'] { color: #0C66E4; }
.atcm-replies { margin-inline-start: 1rem; padding-inline-start: .85rem;
                border-inline-start: 2px solid #DFE1E6; }
.atcm-form { display: flex; gap: .65rem; padding-block: .55rem; }
.atcm-form textarea { flex: 1; min-block-size: 2.5rem; padding: .5rem .6rem; border: 1px solid #DFE1E6;
                      border-radius: 4px; font: 400 .8rem/1.55 Inter, system-ui; }
.atcm-send { align-self: flex-start; block-size: 1.85rem; padding-inline: .75rem; border: none;
             border-radius: 3px; cursor: pointer; background: #0C66E4; color: #fff;
             font: 500 .76rem/1 Inter, system-ui; }
</style>