Comment row
ProOne comment or message in a thread: avatar, bubble, what goes under it and a 48dp actions row that spaces the comments. Not an M3 component (@windmorph/react-pro).
import { CommentRow } from '@windmorph/react-pro';Part of Windmorph Pro, paid components on the free core, not on sale yet. See the Pro guide for what it includes and to register interest.
Props
CommentRow 14 props
The avatar, usually
Avataratsize="sm", decorative (the name is in the bubble).The name line and the words.
The 48dp row of actions: when, Like, Reply, a menu. It spaces one comment from the next. Actions that don't fit wrap onto another line.
Under the bubble: a photo, a note. Keeps 4dp off the bubble.
outlined: a dashed bubble, for a removed comment only its writer sees.Being sent: a quieter bubble, two surface steps down (the words keep full contrast), and
aria-busy.The root element:
articlenamed by the app ("Comment by Ada"),liin a list.The root element (
as). Its other props (id,aria-*,data-*) go to it too.Makes the bubble a link to this address.
Classes for the root; consumer classes always win.
Classes for each part, merged after the defaults.
Inline styles for the root, e.g. a
--wm-comment-row-*token.
Also accepts the root element's HTML attributes (id, data-*, event handlers).
Spec status
Not part of Material Design 3: a Windmorph Pro component, built on M3's colour roles, type scale, shapes and motion. Its variants and configurations each link to a live example.
| Item | Status | Details |
|---|---|---|
Filled bubble (variant="filled") | Built | Variant · Thread |
Dashed bubble for a removed comment (variant="outlined") | Built | Variant · States |
Being sent (pending) | Built | Configuration · Thread |
Content below the bubble (below) | Built | Configuration · States |
A named comment (as="article") | Built | Configuration · States |
A thread in a list (as="li"), with reactions | Built | Use case · Thread |
Filled bubble (
Builtvariant="filled")Variant · Thread
Dashed bubble for a removed comment (
Builtvariant="outlined")Variant · States
Being sent (
Builtpending)Configuration · Thread
Content below the bubble (
Builtbelow)Configuration · States
A named comment (
Builtas="article")Configuration · States
A thread in a list (
Builtas="li"), with reactionsUse case · Thread
Theming & tokens
Set the tokens below on a row or any ancestor. Style the parts with classNames (root, avatar, bubble, below, actions).
| Variable | Default | Paints |
|---|---|---|
--wm-comment-row-bubble-container | var(--md-sys-color-surface-container-highest) | The bubble’s background (`filled`). |
--wm-comment-row-bubble-outline | var(--md-sys-color-outline) | The bubble’s dashed outline (`outlined`, a removed comment). |
--wm-comment-row-bubble-corner | var(--md-sys-shape-corner-large) | The bubble’s corners. |
--wm-comment-row-bubble-padding-inline | 12px | Inside the bubble, at its sides. |
--wm-comment-row-bubble-padding-block | 8px | Inside the bubble, above and below. |
--wm-comment-row-avatar-gap | 8px | Between the avatar and the bubble. |
--wm-comment-row-below-gap | 4px | Between the bubble and what goes under it (a photo, a note). |
--wm-comment-row-actions-height | 48px | The actions row, which also spaces one comment from the next. |
--wm-comment-row-actions-gap | 4px | Between the actions. |
--wm-comment-row-bubble-container-pending | var(--md-sys-color-surface-container) | The bubble’s background while it’s being sent (`pending`): two surface steps quieter, an opaque role, so the words keep full contrast in both modes. |