Comment
Comment Thread Example
Comment is a standalone component
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.
<div class="c-comment" data-uid="691626745d64d">
<div class="c-comment__col">
<!-- avatar.blade.php -->
<div class="c-avatar c-avatar--size-md" data-uid="691626745d6e2">
<span class="c-avatar__icon" aria-label="Peter Svensson">
<!-- icon.blade.php -->
<span class="c-icon c-icon--size-lg c-icon--face c-icon--material c-icon--material-face material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined c-icon--size-inherit" data-material-symbol="face" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" aria-hidden="false" data-uid="691626745d72e">
</span>
</span>
</div>
</div>
<div class="c-comment__col">
<div class="c-comment__top">
<a class="c-link c-comment__link" href="#" target="_top" data-uid="691626745d80c">
<!-- typography.blade.php original: h6 -->
<h2 class="c-typography c-comment__author c-typography__variant--h2" data-uid="691626745d7a3">
Peter Svensson
</h2>
</a>
<!-- typography.blade.php original: span -->
<span class="c-typography c-comment__date c-typography__variant--meta" data-uid="691626745d8e3">
<time class="c-date" data-date="2023-05-10T13:31:36" datetime="2023-05-10T13:31:36" data-tooltip="Wed 10 May 2023" data-uid="691626745d8a4">2 år ago</time>
</span> </div>
<div class="c-comment__bubble c-comment__bubble--color-dark">
<!-- typography.blade.php original: p -->
<p class="c-typography c-comment__bubble--inner c-typography__variant--body" data-uid="691626745d91a">
This is a comment text
</p>
</div>
<div class="c-comment__actions">
<a class="c-button c-button__basic c-button__basic--default c-button--sm" href="#reply" target="_top" aria-label="Reply" data-uid="691626745d37e">
<span class="c-button__label"> <span class="c-button__loader"></span>
<span class="c-button__label-icon ">
<!-- icon.blade.php -->
<span class="c-icon c-icon--reply c-icon--material c-icon--material-reply material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined c-icon--size-sm" aria-hidden="false" data-material-symbol="reply" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" data-uid="691626745d4f3">
</span>
</span>
<span class="c-button__label-text ">
Reply
</span>
</span> </a>
<a class="c-button c-button__basic c-button__basic--default c-button--sm" href="#like" target="_top" aria-label="Like" data-uid="691626745d55a">
<span class="c-button__label"> <span class="c-button__loader"></span>
<span class="c-button__label-icon ">
<!-- icon.blade.php -->
<span class="c-icon c-icon--thumb-up c-icon--material c-icon--material-thumb_up material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined c-icon--size-sm" aria-hidden="false" data-material-symbol="thumb_up" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" data-uid="691626745d59c">
</span>
</span>
<span class="c-button__label-text ">
Like
</span>
</span> </a>
</div>
</div>
</div>
<div class="c-comment c-comment__is-reply" data-uid="691626745d963">
<div class="c-comment__col">
<!-- avatar.blade.php -->
<div class="c-avatar c-avatar--size-md" data-uid="691626745d999">
<!-- image.blade.php -->
<figure class="c-image c-avatar__image c-image--cover" aria-label="Peter Olsson" data-uid="691626745d9f7">
<div
class="c-image__image-wrapper"
>
<img
loading="lazy"
class="c-image__image"
src="https://picsum.photos/id/338/70/70"
alt="Peter Olsson"
></div> </figure>
</div>
</div>
<div class="c-comment__col">
<div class="c-comment__top">
<div class="c-link c-comment__link" data-uid="691626745dad6">
<!-- typography.blade.php original: h6 -->
<h3 class="c-typography c-comment__author c-typography__variant--h3" data-uid="691626745daa4">
Peter Olsson
</h3>
</div>
<!-- typography.blade.php original: span -->
<span class="c-typography c-comment__date c-typography__variant--meta" data-uid="691626745db53">
<time class="c-date" data-date="2024-10-08T18:41:56" datetime="2024-10-08T18:41:56" data-tooltip="Tue 08 Oct 2024" data-uid="691626745db1c">1 år ago</time>
</span> </div>
<div class="c-comment__bubble c-comment__bubble--color-dark">
<!-- typography.blade.php original: p -->
<p class="c-typography c-comment__bubble--inner c-typography__variant--body" data-uid="691626745db85">
This is a reply comment text
</p>
</div>
</div>
</div>
<div class="c-comment c-comment__is-reply" data-uid="691626745dbda">
<div class="c-comment__col">
<!-- avatar.blade.php -->
<div class="c-avatar c-avatar--size-md" data-uid="691626745dc14">
<!-- image.blade.php -->
<figure class="c-image c-avatar__image c-image--cover" aria-label="Peter Olsson" data-uid="691626745dc46">
<div
class="c-image__image-wrapper"
>
<img
loading="lazy"
class="c-image__image"
src="https://picsum.photos/id/342/70/70"
alt="Peter Olsson"
></div> </figure>
</div>
</div>
<div class="c-comment__col">
<div class="c-comment__top">
<div class="c-link c-comment__link" data-uid="691626745dcee">
<!-- typography.blade.php original: h6 -->
<h4 class="c-typography c-comment__author c-typography__variant--h4" data-uid="691626745dcc0">
Peter Olsson
</h4>
</div>
<!-- typography.blade.php original: span -->
<span class="c-typography c-comment__date c-typography__variant--meta" data-uid="691626745dd63">
<time class="c-date" data-date="2025-11-13T18:41:56" datetime="2025-11-13T18:41:56" data-tooltip="Thu 13 Nov 2025" data-uid="691626745dd2e">just now </time>
</span> </div>
<div class="c-comment__bubble c-comment__bubble--color-dark">
<!-- typography.blade.php original: p -->
<p class="c-typography c-comment__bubble--inner c-typography__variant--body" data-uid="691626745dd93">
This is a reply comment text, it was written now.
</p>
</div>
</div>
</div>
<div class="c-comment c-comment__is-reply" data-uid="691626745ddd4">
<div class="c-comment__col">
<!-- avatar.blade.php -->
<div class="c-avatar c-avatar--size-md" data-uid="691626745de06">
<!-- image.blade.php -->
<figure class="c-image c-avatar__image c-image--cover" aria-label="Peter Olsson" data-uid="691626745de3d">
<div
class="c-image__image-wrapper"
>
<img
loading="lazy"
class="c-image__image"
src="https://picsum.photos/id/342/70/70"
alt="Peter Olsson"
></div> </figure>
</div>
</div>
<div class="c-comment__col">
<div class="c-comment__top">
<div class="c-link c-comment__link" data-uid="691626745dee2">
<!-- typography.blade.php original: h6 -->
<h5 class="c-typography c-comment__author c-typography__variant--h5" data-uid="691626745deb4">
Peter Olsson
</h5>
</div>
<!-- typography.blade.php original: span -->
<span class="c-typography c-comment__date c-typography__variant--meta" data-uid="691626745df56">
<time class="c-date" data-date="2025-11-13T18:39:56" datetime="2025-11-13T18:39:56" data-tooltip="Thu 13 Nov 2025" data-uid="691626745df22">2 minuter ago</time>
</span> </div>
<div class="c-comment__bubble c-comment__bubble--color-dark">
<!-- typography.blade.php original: p -->
<p class="c-typography c-comment__bubble--inner c-typography__variant--body" data-uid="691626745df86">
This is a reply comment text, it was written two minutes ago.
</p>
</div>
</div>
</div>
<div class="c-comment c-comment__is-reply" data-uid="691626745dfc3">
<div class="c-comment__col">
<!-- avatar.blade.php -->
<div class="c-avatar c-avatar--size-md" data-uid="691626745dff4">
<!-- image.blade.php -->
<figure class="c-image c-avatar__image c-image--cover" aria-label="Peter Olsson" data-uid="691626745e023">
<div
class="c-image__image-wrapper"
>
<img
loading="lazy"
class="c-image__image"
src="https://picsum.photos/id/64/70/70"
alt="Peter Olsson"
></div> </figure>
</div>
</div>
<div class="c-comment__col">
<div class="c-comment__top">
<div class="c-link c-comment__link" data-uid="691626745e0c6">
<!-- typography.blade.php original: h6 -->
<h6 class="c-typography c-comment__author c-typography__variant--h6" data-uid="691626745e098">
Peter Olsson
</h6>
</div>
<!-- typography.blade.php original: span -->
<span class="c-typography c-comment__date c-typography__variant--meta" data-uid="691626745e138">
<time class="c-date" data-date="2025-11-13T13:41:56" datetime="2025-11-13T13:41:56" data-tooltip="Thu 13 Nov 2025" data-uid="691626745e104">5 timmar ago</time>
</span> </div>
<div class="c-comment__bubble c-comment__bubble--color-dark">
<!-- typography.blade.php original: p -->
<p class="c-typography c-comment__bubble--inner c-typography__variant--body" data-uid="691626745e16a">
This is a reply comment text, it was written five hours ago.
</p>
</div>
</div>
</div>
<div class="c-comment" data-uid="691626745e1a4">
<div class="c-comment__col">
<!-- avatar.blade.php -->
<div class="c-avatar c-avatar--size-md" data-uid="691626745e1e7">
<svg class="c-avatar__initials" aria-label="Peter Svensson" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<text font-size="380" y="50%" x="50%" fill="#fff" dominant-baseline="middle" text-anchor="middle" alignment-baseline="central">PS</text>
</svg>
</div>
</div>
<div class="c-comment__col">
<div class="c-comment__top">
<div class="c-link c-comment__link" data-uid="691626745e25a">
<!-- typography.blade.php original: h6 -->
<h6 class="c-typography c-comment__author c-typography__variant--h6" data-uid="691626745e22c">
Peter Svensson
</h6>
</div>
<!-- typography.blade.php original: span -->
<span class="c-typography c-comment__date c-typography__variant--meta" data-uid="691626745e2cd">
<time class="c-date" data-date="2024-11-13T18:41:56" datetime="2024-11-13T18:41:56" data-tooltip="Wed 13 Nov 2024" data-uid="691626745e299">1 år ago</time>
</span> </div>
<div class="c-comment__bubble c-comment__bubble--color-dark">
<div class="c-comment__bubble--inner">
This comment <u>content</u> was sent through the slot.
</div>
</div>
</div>
</div>
<?php
$labels = [
'dateLabels' => [
'year' => 'år',
'month' => 'månad',
'week' => 'vecka',
'day' => 'dag',
'hour' => 'timme',
'minute' => 'minut',
'second' => 'sekund'
],
'dateLabelsPlural' => [
'year' => 'år',
'month' => 'månader',
'week' => 'veckor',
'day' => 'dagar',
'hour' => 'timmar',
'minute' => 'minuter',
'second' => 'sekund'
]
];
?>
@comment([
'author' => 'Peter Svensson',
'author_url' => '#',
'text' => 'This is a comment text',
'icon' => 'face',
'date' => date("Y-m-d H:i:s", strtotime('-2 years -6 months -3days -5 hours -10 minutes -20 seconds')),
'dateLabels' => $labels['dateLabels'],
'dateLabelsPlural' => $labels['dateLabelsPlural']
])
@slot('actions')
@button([
'text' => 'Reply',
'color' => 'default',
'style' => 'basic',
'href' => '#reply',
'icon' => 'reply',
'size' => 'sm'
])
@endbutton
@button([
'text' => 'Like',
'color' => 'default',
'style' => 'basic',
'href' => '#like',
'icon' => 'thumb_up',
'size' => 'sm'
])
@endbutton
@endslot
@endcomment
@comment([
'author' => 'Peter Olsson',
'text' => 'This is a reply comment text',
'icon' => 'face',
'author_image' => 'https://picsum.photos/id/338/70/70',
'date' => date("Y-m-d H:i:s", strtotime('-1 year -1 month -5 days')),
'is_reply' => true,
'dateLabels' => $labels['dateLabels'],
'dateLabelsPlural' => $labels['dateLabelsPlural']
])
@endcomment
@comment([
'author' => 'Peter Olsson',
'text' => 'This is a reply comment text, it was written now.',
'icon' => 'face',
'author_image' => 'https://picsum.photos/id/342/70/70',
'date' => date("Y-m-d H:i:s"),
'is_reply' => true,
'dateLabels' => $labels['dateLabels'],
'dateLabelsPlural' => $labels['dateLabelsPlural']
])
@endcomment
@comment([
'author' => 'Peter Olsson',
'text' => 'This is a reply comment text, it was written two minutes ago.',
'icon' => 'face',
'author_image' => 'https://picsum.photos/id/342/70/70',
'date' => date("Y-m-d H:i:s", strtotime('-2 minutes')),
'is_reply' => true,
'dateLabels' => $labels['dateLabels'],
'dateLabelsPlural' => $labels['dateLabelsPlural']
])
@endcomment
@comment([
'author' => 'Peter Olsson',
'text' => 'This is a reply comment text, it was written five hours ago.',
'icon' => 'face',
'author_image' => 'https://picsum.photos/id/64/70/70',
'date' => date("Y-m-d H:i:s", strtotime('-5 hours')),
'is_reply' => true,
'dateLabels' => $labels['dateLabels'],
'dateLabelsPlural' => $labels['dateLabelsPlural']
])
@endcomment
@comment([
'author' => 'Peter Svensson',
'date' => date("Y-m-d H:i:s", strtotime('-1 year')),
'dateLabels' => $labels['dateLabels'],
'dateLabelsPlural' => $labels['dateLabelsPlural']
])
This comment <u>content</u> was sent through the slot.
@endcomment
Blade component parameters
| Key | Default value | Type | Available values | Description |
| author | string | - | Name of the commenter | |
| author_url | string | - | URL to the profile of the author | |
| author_image | string | - | A link to an image | |
| text | string | - | Content of the comment | |
| icon | string | - | Which icon to show | |
| bubble_color | dark | string | - | Color for comment bubble background: light or dark |
| date | 01/02/2019 | string | - | The date when the comment was posted |
| date_suffix | ago | string | - | Time elapsed 'since' |
| dateLabels | [] | array | - | Array containing translations valid keys: year, month, week, day, hour, minute, second |
| dateLabelsPlural | [] | array | - | Array containing translations valid keys: year, month, week, day, hour, minute, second |
| componentElement | div | string | - | Element of the component |
| is_reply | false | boolean | - | If true the comment will be displayed as a reply |
| filterHtml | false | boolean | - | If set to true the comment will be filtered from html tags |
| allowedTags | <b><strong><i><em><mark><small><del><ins><sub><sup> | string | - | Which tags should be excluded from filtration |
| id | string | - | The DOM id of the component. | |
| classList | [] | array | - | Array containing wrapping classes array |
| attributeList | [] | array | - | Array containing keys and values rendered as attributes |
| containerAware | false | boolean | true/false | Makes the component container aware. Appends modifiers --size--xs/sm/md/lg to the component. |
Peter Svensson
This is a comment text