Skip to content

Comment

A purely presentational comment block container that assembles the author avatar, name, time, content, and actions via slots; nested child comments are automatically indented.

Basic Usage

Single comment

AAlice3 minutes ago

This component supports a purely presentational comment structure; interactions are provided by the host via the actions slot.

ReplyLike

Nested Child Comments

Nested replies (auto-indent)

BBobYesterday 18:20

Parent comment: I agree with this design; child comments are automatically indented with a guide line.

ReplyCCarolYesterday 19:02

Child comment: nest oas-comment via the default slot, with no depth limit.

Reply

Empty State

Empty comment

With no slot content at all, it renders as an empty container without errors; the sections of empty slots are hidden automatically.

API

Slots

NameDescription
defaultNested oas-comment child comments, automatically indented
actionsAction area (reply / like, etc., provided by the host)
authorAuthor name
avatarAuthor avatar (can hold an oas-avatar)
contentComment content
timeTime

Parts: ::part(comment) root, ::part(main) main body, ::part(avatar) / ::part(author) / ::part(time) / ::part(content) / ::part(actions), ::part(children) child comment container.