Configuration
The <commentix-widget> HTML element accepts various attributes to configure the widget. This page serves as the
complete reference.
Info
Unless otherwise noted, all attributes are optional.
language
Specifies the UI language used by the widget.
By default, the widget reads the lang attribute from the document's <html> element:
If no language is detected or the value is not supported, the widget falls back to English (en).
Supported language codes:
cz(Czech)da(Danish)de(German)el(Greek)en(English)es(Spanish)es-419(Spanish Latin America)fi(Finnish)fr(French)hu(Hungarian)it(Italian)nl(Dutch)no(Norwegian)pl(Polish)pt(Portuguese)pt-BR(Portuguese Brasil)ro(Romanian)ru(Russian)sv(Swedish)tr(Turkish)uk(Ukrainian)
maxLevels
Controls the maximum allowed nesting depth for comment replies.
Once the configured depth is reached, the Reply button is hidden to prevent further nesting. Limiting nesting depth
helps preserve readability and accessibility, especially on smaller screens.
Default: 3
noCount
Disables the display of the total comment count in the widget header.
This attribute is boolean and does not require a value.
noRating
Disables comment rating (likes).
When set, users can no longer like comments and existing rating controls are hidden.
page
Defines the canonical page URL associated with the comment thread. This value is used to generate shareable links to individual comments and links to the thread in notification emails.
By default, the widget derives the URL from the current browser location, automatically removing query parameters and fragments.
For example, https://www.example.com/blog/article.html?id=value#some-anchor becomes
https://www.example.com/blog/article.html.
If this behavior does not match your routing or canonicalization strategy, you can explicitly set the page URL using this attribute.
Example
site
Identifies the site this widget instance belongs to.
This attribute is required. You can find your site ID in the Integration section in the
Commentix Console. Use the same ID across all pages that belong to that site.
sort
Sets the initial sort order of comments.
Supported values:
bestlatestoldest
Default: best
thread
Explicitly defines the identifier used to group comments into a thread.
All comments on a site are grouped in threads, and each thread belongs to a single page. By default, the widget uses
the pathname of the current browser location as the unique identifier of the thread. For example, if the widget is
embedded on https://www.example.com/en/blog/some-article.html?param=value, the thread ID will be
/en/blog/some-article.html.
While sufficient for many sites, this default can cause issues in the following scenarios:
- URLs change over time (e.g. content migrations or rewrites)
- Multilingual sites where language is not part of the pathname
- Pages identified by query parameters or backend IDs (e.g. /blog/article?id=123)
- Multiple URLs pointing to the same logical page
In these cases, setting a stable, application-defined thread ID is strongly recommended.
visibleComments
Controls how many root comments are shown initially before the Show all comments button is displayed.
Default: 5
visibleLevels
Controls how many comment levels are expanded by default.
Default: 1