Configuration Reference
When create or update a widget, you can pass the configuration to change its appearance or behavior.
This is an example code that change the widget to dark mode:
window.SlickComment.renderDiscussion({ // other options... colorScheme: 'dark',});Check out the table below for all the available options!
| Key | Type | Description | Supported Widgets |
|---|---|---|---|
| siteId | string | Site ID | All |
| locale | string | Language of the widget, default value is set in the console dashboard. | All |
| avatarVariant | string 'circular', 'rounded', 'square' | Avatar shape | All |
| colorScheme | string 'light', 'dark' | Color scheme | All |
| colorPrimary | string Color in hex format Default: #2979ff (blue) | The primary color (of submit buttons & links) | All |
| boxBorderRadius | number Default: 4 | Border radius of boxes and avatar if avatarVariant is rounded | All |
| buttonBorderRadius | number Default: 4 | Border radius of buttons | All |
| fontSize | number Default: 14 | Font size | All |
| fontFamily | string | Custom font family. Example: 'Reenie Beanie', cursive | All |
| fontFaceUrl | string | Custom font URL. Example: https://fonts.googleapis.com/css2?family=Reenie+Beanie&display=swap | All |
| spacing | number Default: 8 | Space between components. This also affects avatar size. | All |
| avatarSizeMultiplier | number Default: 1 | Avatar size multiplier | All |
| userSsoId | string|number | See Single Sign-On | All |
| getUserSsoToken | function | See Single Sign-On | All |
| translations | object | See Translations | Discussion, User Comments, Site Comments |
| pageId | string | Page ID | Discussion |
| pageUrl | string | Page URL | Discussion |
| pageTitle | string | Page title | Discussion |
| defaultSortId | string 'best', 'newest', 'oldest' | Default comment sort | Discussion |
| nbCommentsFirstLoad | number Default: 30 | Number of comments on the first load | Discussion |
| btnAddCommentPosition | string 'top', 'bottom' | Position of button "Add comment" | Discussion |
| btnAddCommentVariant | string 'contained', 'outlined', 'text' | Variant of button "Add comment" | Discussion |
| btnAddCommentSize | string 'medium', 'small', 'large' | Size of button "Add comment" | Discussion |
| newCommentPosition | string 'top', 'bottom' | Position of newly posted comments | Discussion |
| targetUserSsoId | string | User SSO ID | UserComments |