Comment

Includes styles for comments, for example for a blog section on your site.

Comment

Includes styles for comments, for example for a blog section on your site.

Usage

The Comment component consists of the comment itself, a comment header, including an avatar, a title and metadata, and a comment body.

ClassDescription
.uk-commentAdd this class to define the Comment component.
.uk-comment-bodyAdd this class to create a comment body.
.uk-comment-headerAdd this class to create a comment header.
.uk-comment-titleAdd this class to a heading to create a comment title.
.uk-comment-metaAdd this class to create meta data about your comment, e.g. a subnav.
.uk-comment-avatarAdd this class to an <img> element to create an avatar for the comment author.
<article class="uk-comment">
    <header class="uk-comment-header">
        <img class="uk-comment-avatar" src="" width="" height="" alt="">
        <h4 class="uk-comment-title"></h4>
        <ul class="uk-comment-meta uk-subnav"></ul>
    </header>
    <div class="uk-comment-body"></div>
</article>

Primary modifier

To style a comment differently, for example to highlight it as the admin’s comment, just add the .uk-comment-primary class.

<article class="uk-comment uk-comment-primary"></article>

Lists

Add the .uk-comment-list class to a <ul> element to create a list of comments. You can nest any number of <ul> elements inside a comment list.

<ul class="uk-comment-list">
    <li>
        <article class="uk-comment"></article>
        <ul>
            <li>
                <article class="uk-comment"></article>
            </li>
        </ul>
    </li>
</ul>