CommentThread
A post's comments as an ordered list of pieces a caller arranges.
MOMina Okafor Does the overnight proof work in a cold kitchen too? Mine sits around 16°C.
RARosa Amat Tried it with rye in the starter. Darker crust, same open crumb.
View code
<CommentThread aria-label="Comments">
<CommentThread.Comment id="comment-1">
<CommentThread.Header>
<Avatar size="sm"><Avatar.Fallback>MO</Avatar.Fallback></Avatar>
<CommentThread.Author href="https://example.com">Mina Okafor</CommentThread.Author>
<CommentThread.Permalink href="#comment-1">
<CommentThread.Date dateTime="2026-11-04T10:05">November 4, 2026 at 10:05</CommentThread.Date>
</CommentThread.Permalink>
</CommentThread.Header>
<CommentThread.Body>
<p>Does the overnight proof work in a cold kitchen too?</p>
</CommentThread.Body>
<CommentThread.Footer><a href="#reply-1">Reply</a></CommentThread.Footer>
<CommentThread.Replies>
<CommentThread.Comment id="comment-2" byAuthor>
…
</CommentThread.Comment>
</CommentThread.Replies>
</CommentThread.Comment>
</CommentThread>Installation
An ordinary dependency: install it, import the theme once, and import the component where it is used.
npm add @sdxc/ui remiximport "@sdxc/ui/theme.css";Usage
import { CommentThread } from "@sdxc/ui/blog";Renders the thread: an <ol> of CommentThread.Comments, stacked with a gap and no
markers, so the caller numbers comments in their own ids and links. Restyle every part
through CommentThread.CustomProperties on the thread.
Composition
The parts the component publishes, each a static property of the host.
CommentThreadCommentThread.CommentOne comment, its parts stacked in the order written;byAuthorsets it on a brand-tinted surface behind a leading rule.CommentThread.HeaderThe comment's header line: whatever it holds (an avatar, the author, the permalinked date) on one wrapping line in small muted type, centred on each other.CommentThread.AuthorThe commenter's name in emphasis weight, a link to their site when given anhref.CommentThread.PermalinkThe link to the comment itself, usually wrapping its CommentThread.Date; muted, underlined under the pointer.CommentThread.DateWhen the comment was posted, as a<time>; the children are the words a reader sees anddateTimethe moment a machine reads.CommentThread.BodyWhat the comment says: its paragraphs spaced apart in the thread's reading face, with no margin outside the first and last.CommentThread.FooterThe comment's actions, such as a reply link, on one small muted line.CommentThread.RepliesThe replies to a comment, a nested<ol>of CommentThread.Comments indented past a rule down its start.
Props
Read from the component's own types, so every prop, every default and every allowed value is listed.
Also accepts everything in TagProps<"ol">.
CommentThread.Comment
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
byAuthor | boolean | — | No | Marks a comment by the post's own author with a tinted surface and a leading rule. |
Also accepts everything in TagProps<"li">.
CommentThread.Header
Also accepts everything in TagProps<"header">.
CommentThread.Author
CommentThread.Permalink
CommentThread.Date
Also accepts everything in TagProps<"time">.
CommentThread.Body
Also accepts everything in TagProps<"div">.
CommentThread.Footer
Also accepts everything in TagProps<"footer">.
CommentThread.Replies
Also accepts everything in TagProps<"ol">.