Comment
Comment Thread Example
Comment is a standalone component
Peter Olsson
This is a reply comment text
Peter Svensson
This comment was sent through the slot
<div class="c-comment" data-uid="66383458449cc">
<div class="c-comment__col">
<!-- avatar.blade.php -->
<div class="c-avatar c-avatar--size-md" data-uid="6638345844a28">
<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-outlined material-symbols-outlined--filled c-icon--size-inherit" material-symbol="face" role="img" aria-label="Icon: Undefined" alt="Icon: Undefined" data-nosnippet="" translate="no" aria-hidden="true" data-uid="6638345844a5c">
</span>
</span>
</div>
</div>
<div class="c-comment__col">
<div class="c-comment__top">
<a class="c-link c-comment__link" id="" href="#" target="_top" data-uid="6638345844af8">
<!-- typography.blade.php original: h6 -->
<h2 class="c-typography c-comment__author c-typography__variant--h2" data-uid="6638345844aaf">
Peter Svensson
</h2>
</a>
<!-- typography.blade.php original: span -->
<span class="c-typography c-comment__date c-typography__variant--meta" data-uid="6638345844c2d">
<div class="c-tooltip c-tooltip--top c-tooltip--hidden" original-placement="c-tooltip--top" id="6638345844bbf" data-uid="6638345844bbf">
<div class="c-tooltip__wrapper" tabindex="1" aria-describedby="6638345844bbf">
<!-- icon.blade.php -->
<span class="c-icon c-icon--info c-icon--material c-icon--material-info material-symbols-outlined material-symbols-outlined--filled c-icon--size-md" material-symbol="info" role="img" aria-label="Icon: Undefined" alt="Icon: Undefined" data-nosnippet="" translate="no" aria-hidden="true" data-uid="6638345844bf9">
</span>
<div class="c-tooltip__container" aria-hidden="true" role="tooltip" id="6638345844bbf">
<div class="c-tooltip__content">
<time class="2019-12-01 17:25 c-date" data-uid="6638345844b6f">4 year</time>
</div>
<span class="c-tooltip__arrow"></span>
</div>
</div>
</div>
</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="6638345844c57">
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" target="_top" type="button" href="#reply" aria-label="Reply" data-uid="6638345844847">
<span class="c-button__label">
<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-outlined material-symbols-outlined--filled c-icon--size-sm" aria-hidden="true" material-symbol="reply" role="img" aria-label="Icon: Undefined" alt="Icon: Undefined" data-nosnippet="" translate="no" data-uid="66383458448bd">
</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" target="_top" type="button" href="#like" aria-label="Like" data-uid="663834584490e">
<span class="c-button__label">
<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-outlined material-symbols-outlined--filled c-icon--size-sm" aria-hidden="true" material-symbol="thumb_up" role="img" aria-label="Icon: Undefined" alt="Icon: Undefined" data-nosnippet="" translate="no" data-uid="6638345844945">
</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="6638345844c87">
<div class="c-comment__col">
<!-- avatar.blade.php -->
<div class="c-avatar c-avatar--size-md" data-uid="6638345844cc4">
<img src="https://picsum.photos/id/64/70/70" class="c-avatar__image" alt="Peter Olsson" aria-label="Peter Olsson"/>
</div>
</div>
<div class="c-comment__col">
<div class="c-comment__top">
<span class="c-link c-comment__link" id="" target="_top" data-uid="6638345844d24">
<!-- typography.blade.php original: h6 -->
<h3 class="c-typography c-comment__author c-typography__variant--h3" data-uid="6638345844cfa">
Peter Olsson
</h3>
</span>
<!-- typography.blade.php original: span -->
<span class="c-typography c-comment__date c-typography__variant--meta" data-uid="6638345844def">
<div class="c-tooltip c-tooltip--top c-tooltip--hidden" original-placement="c-tooltip--top" id="6638345844d83" data-uid="6638345844d83">
<div class="c-tooltip__wrapper" tabindex="1" aria-describedby="6638345844d83">
<!-- icon.blade.php -->
<span class="c-icon c-icon--info c-icon--material c-icon--material-info material-symbols-outlined material-symbols-outlined--filled c-icon--size-md" material-symbol="info" role="img" aria-label="Icon: Undefined" alt="Icon: Undefined" data-nosnippet="" translate="no" aria-hidden="true" data-uid="6638345844dc1">
</span>
<div class="c-tooltip__container" aria-hidden="true" role="tooltip" id="6638345844d83">
<div class="c-tooltip__content">
<time class="2020-01-01 17:25 c-date" data-uid="6638345844d5a">4 year</time>
</div>
<span class="c-tooltip__arrow"></span>
</div>
</div>
</div>
</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="6638345844e15">
This is a reply comment text
</p>
</div>
</div>
</div>
<div class="c-comment" data-uid="6638345844e3d">
<div class="c-comment__col">
<!-- avatar.blade.php -->
<div class="c-avatar c-avatar--size-md" data-uid="6638345844e6f">
<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">
<span class="c-link c-comment__link" id="" target="_top" data-uid="6638345844eb9">
<!-- typography.blade.php original: h6 -->
<h4 class="c-typography c-comment__author c-typography__variant--h4" data-uid="6638345844e96">
Peter Svensson
</h4>
</span>
<!-- typography.blade.php original: span -->
<span class="c-typography c-comment__date c-typography__variant--meta" data-uid="6638345844f64">
<div class="c-tooltip c-tooltip--top c-tooltip--hidden" original-placement="c-tooltip--top" id="6638345844f0a" data-uid="6638345844f0a">
<div class="c-tooltip__wrapper" tabindex="1" aria-describedby="6638345844f0a">
<!-- icon.blade.php -->
<span class="c-icon c-icon--info c-icon--material c-icon--material-info material-symbols-outlined material-symbols-outlined--filled c-icon--size-md" material-symbol="info" role="img" aria-label="Icon: Undefined" alt="Icon: Undefined" data-nosnippet="" translate="no" aria-hidden="true" data-uid="6638345844f37">
</span>
<div class="c-tooltip__container" aria-hidden="true" role="tooltip" id="6638345844f0a">
<div class="c-tooltip__content">
<time class="2020-01-09 17:25 c-date" data-uid="6638345844ee8">4 år</time>
</div>
<span class="c-tooltip__arrow"></span>
</div>
</div>
</div>
</span> </div>
<div class="c-comment__bubble c-comment__bubble--color-dark">
<div class="c-comment__bubble--inner">
This comment was sent through the slot
</div>
</div>
</div>
</div>
@comment([
'author' => 'Peter Svensson',
'author_url' => '#',
'text' => 'This is a comment text',
'icon' => 'face',
'date' => '2019-12-01 17:25:43'
])
@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/64/70/70',
'date' => '2020-01-01 17:25:43',
'is_reply' => true
])
@endcomment
@comment([
'author' => 'Peter Svensson',
'date' => '2020-01-09 17:25:43',
'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'
]
])
This comment 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 | 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