Comment
Comment Thread Example
Comment is a standalone component
Warning: Element "h6" and variant "title" cannot be combined. Heading elements must use a heading variant. in /var/www/webroot/ROOT/vendor/helsingborg-stad/component-library/source/php/Component/Typography/Typography.php on line 52
Peter Olsson
This is a reply comment text
Warning: Element "h6" and variant "title" cannot be combined. Heading elements must use a heading variant. in /var/www/webroot/ROOT/vendor/helsingborg-stad/component-library/source/php/Component/Typography/Typography.php on line 52
Peter Svensson
This comment was sent through the slot
<div class="c-comment" data-uid="6605af1fa5a39">
<div class="c-comment__col">
<!-- avatar.blade.php -->
<div class="c-avatar c-avatar--size-md" data-uid="6605af1fa5ab9">
<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="6605af1fa5afd">
face
</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="6605af1fa5c35">
<br />
<b>Warning</b>: Element "h2" and variant "title" cannot be combined. Heading elements must use a heading variant. in <b>/var/www/webroot/ROOT/vendor/helsingborg-stad/component-library/source/php/Component/Typography/Typography.php</b> on line <b>52</b><br />
<!-- typography.blade.php original: h6 -->
<h2 class="c-typography c-comment__author c-typography__variant--h2" data-uid="6605af1fa5bb1">
Peter Svensson
</h2>
</a>
<!-- typography.blade.php original: span -->
<span class="c-typography c-comment__date c-typography__variant--meta" data-uid="6605af1fa5df2">
<div class="c-tooltip c-tooltip--top c-tooltip--hidden" original-placement="c-tooltip--top" id="6605af1fa5d53" data-uid="6605af1fa5d53">
<div class="c-tooltip__wrapper" tabindex="1" aria-describedby="6605af1fa5d53">
<!-- 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="6605af1fa5dad">
info
</span>
<div class="c-tooltip__container" aria-hidden="true" role="tooltip" id="6605af1fa5d53">
<div class="c-tooltip__content">
<time class="2019-12-01 17:25 c-date" data-uid="6605af1fa5ce3">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="6605af1fa5e28">
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="6605af1fa5886">
<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="6605af1fa5912">
reply
</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="6605af1fa5963">
<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="6605af1fa59a3">
thumb_up
</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="6605af1fa5e66">
<div class="c-comment__col">
<!-- avatar.blade.php -->
<div class="c-avatar c-avatar--size-md" data-uid="6605af1fa5e9c">
<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="6605af1fa5f36">
<br />
<b>Warning</b>: Element "h3" and variant "title" cannot be combined. Heading elements must use a heading variant. in <b>/var/www/webroot/ROOT/vendor/helsingborg-stad/component-library/source/php/Component/Typography/Typography.php</b> on line <b>52</b><br />
<!-- typography.blade.php original: h6 -->
<h3 class="c-typography c-comment__author c-typography__variant--h3" data-uid="6605af1fa5efe">
Peter Olsson
</h3>
</span>
<!-- typography.blade.php original: span -->
<span class="c-typography c-comment__date c-typography__variant--meta" data-uid="6605af1fa602c">
<div class="c-tooltip c-tooltip--top c-tooltip--hidden" original-placement="c-tooltip--top" id="6605af1fa5fa7" data-uid="6605af1fa5fa7">
<div class="c-tooltip__wrapper" tabindex="1" aria-describedby="6605af1fa5fa7">
<!-- 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="6605af1fa5fee">
info
</span>
<div class="c-tooltip__container" aria-hidden="true" role="tooltip" id="6605af1fa5fa7">
<div class="c-tooltip__content">
<time class="2020-01-01 17:25 c-date" data-uid="6605af1fa5f78">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="6605af1fa605b">
This is a reply comment text
</p>
</div>
</div>
</div>
<div class="c-comment" data-uid="6605af1fa6092">
<div class="c-comment__col">
<!-- avatar.blade.php -->
<div class="c-avatar c-avatar--size-md" data-uid="6605af1fa60cd">
<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="6605af1fa6164">
<br />
<b>Warning</b>: Element "h4" and variant "title" cannot be combined. Heading elements must use a heading variant. in <b>/var/www/webroot/ROOT/vendor/helsingborg-stad/component-library/source/php/Component/Typography/Typography.php</b> on line <b>52</b><br />
<!-- typography.blade.php original: h6 -->
<h4 class="c-typography c-comment__author c-typography__variant--h4" data-uid="6605af1fa612e">
Peter Svensson
</h4>
</span>
<!-- typography.blade.php original: span -->
<span class="c-typography c-comment__date c-typography__variant--meta" data-uid="6605af1fa6246">
<div class="c-tooltip c-tooltip--top c-tooltip--hidden" original-placement="c-tooltip--top" id="6605af1fa61d2" data-uid="6605af1fa61d2">
<div class="c-tooltip__wrapper" tabindex="1" aria-describedby="6605af1fa61d2">
<!-- 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="6605af1fa620c">
info
</span>
<div class="c-tooltip__container" aria-hidden="true" role="tooltip" id="6605af1fa61d2">
<div class="c-tooltip__content">
<time class="2020-01-09 17:25 c-date" data-uid="6605af1fa61a1">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. |
Warning: Element "h5" and variant "title" cannot be combined. Heading elements must use a heading variant. in /var/www/webroot/ROOT/vendor/helsingborg-stad/component-library/source/php/Component/Typography/Typography.php on line 52
Peter Svensson
This is a comment text