SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

CommentThread

A post's comments as an ordered list of pieces a caller arranges.

  1. MOMina Okafor

    Does the overnight proof work in a cold kitchen too? Mine sits around 16°C.

    1. JLJun Larsen

      It does, it just takes longer. Give it fourteen hours instead of ten.

      Poke test still decides: it should spring back slowly.

  2. RARosa Amat

    Tried it with rye in the starter. Darker crust, same open crumb.

View code
tsx
<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.

Terminal
npm add @sdxc/ui remix
typescript
import "@sdxc/ui/theme.css";

Usage

typescript
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.

  • CommentThread
  • CommentThread.CommentOne comment, its parts stacked in the order written; byAuthor sets 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 an href.
  • 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 and dateTime the 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

PropTypeDefaultRequiredDescription
byAuthorboolean—NoMarks 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.Date

Also accepts everything in TagProps<"time">.

CommentThread.Body

Also accepts everything in TagProps<"div">.

Also accepts everything in TagProps<"footer">.

CommentThread.Replies

Also accepts everything in TagProps<"ol">.

@sdxc/ui

Can’t find it? Contact us