Comment
The Comment component provides a reusable pattern for comment in the interface.
Comment Thread Example
The comment can be used as a top level comment and as a reply.
Peter Olsson
This is a reply comment text
Peter Olsson
This is a reply comment text, it was written now.
Peter Olsson
This is a reply comment text, it was written two minutes ago.
Peter Olsson
This is a reply comment text, it was written five hours ago.
Peter Svensson
This comment content was sent through the slot.
API
| Parameter | Default | Type | Description |
|---|---|---|---|
|
author
|
string | - | |
|
author_url
|
string | - | |
|
author_image
|
string | - | |
|
text
|
string | - | |
|
icon
|
string | - | |
|
bubble_color
|
dark | string | - |
|
date
|
01/02/2019 | string | - |
|
date_suffix
|
ago | string | - |
|
dateLabels
|
[] | array | - |
|
dateLabelsPlural
|
[] | array | - |
|
componentElement
|
div | string | - |
|
is_reply
|
false | boolean | - |
|
filterHtml
|
false | boolean | - |
|
allowedTags
|
|
string | - |
|
actions
|
false | object|boolean | - |
CSS API
| Variable | Default | Type | Values | Description |
|---|---|---|---|---|
|
--c-comment--space
|
var(--space) | range | - | Base spacing unit. Used for padding and margin inside components. |
|
--c-comment--outer-space
|
var(--outer-space) | range | - | Spacing between components. Use --space for spacing inside components. |
|
--c-comment--border-radius
|
var(--border-radius) | range | - | Border Radius |
|
--c-comment--color--surface
|
var(--color--surface) | color | - | Surface |
|
--c-comment--corner-shape
|
var(--corner-shape) | select | square, round, squircle, circular, bevel, scoop | Corner Shape |
|
--c-comment--color--surface-contrast
|
var(--color--surface-contrast) | color | - | Used for text and icons on surface backgrounds with less contrast. |
|
--c-comment--color--background-contrast-muted
|
var(--color--background-contrast-muted) | color | - | Derived muted contrast for text and icons on background surfaces. |
|
--c-comment--font-size-90
|
var(--font-size-90) | range | - | One step below base in the type scale. |
Peter Svensson
This is a comment text