About this set
A complete comment section for the end of a blog post, plus a notice for posts where comments are closed. The section opens with a serif count heading, the post it belongs to and a Sort by select with Top, Newest and Oldest. Each comment has an initials avatar, the name, an Author badge on replies from the writer, a relative time inside a time element with a machine-readable datetime and the full date as a tooltip, the like count and a Reply link. The first four comments are shown; Load more comments reveals three more at a time, moves focus to the first new one and updates a polite Showing 7 of 9 comments line, and the button disappears when everything is visible. Reply links jump to the Leave a comment form below and add a Replying to note with a Cancel reply button. Sorting reorders the whole list and keeps the number shown. Without JavaScript every comment is visible and the links still reach the form. The comments closed notice uses a lock icon, a short reason and a link to a follow-up post.
What’s included
- Count heading and a Sort by select for Top, Newest and Oldest
- Author badge and time elements with datetime and full-date titles
- Load more with focus moved to the first new comment
- A polite "Showing n of n comments" line
- Reply links that address the comment form, and a comments closed notice
Accessibility
The section is named by its heading, the sort select has a visible label, and each comment is an article named after its author. Load more moves focus to the first revealed comment and the count line is a polite live region. Reply links include the author's name in visually hidden text, form fields have visible labels, and links, buttons and fields have visible focus styles.
Customise it
Change --bc-accent, --bc-soft and --bc-line on .bc, and data-initial and data-step on the Load more button. Bootstrap uses the same variables with .form-select, .badge and .btn; in Tailwind edit the --color-bc-* theme colours.






