Skip to main content

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!

KeyTypeDescriptionSupported Widgets
siteIdstringSite IDAll
localestringLanguage of the widget, default value is set in the console dashboard.All
avatarVariantstring
'circular', 'rounded', 'square'
Avatar shapeAll
colorSchemestring
'light', 'dark'
Color schemeAll
colorPrimarystring
Color in hex format
Default: #2979ff (blue)
The primary color (of submit buttons & links)All
boxBorderRadiusnumber
Default: 4
Border radius of boxes and avatar if avatarVariant is roundedAll
buttonBorderRadiusnumber
Default: 4
Border radius of buttonsAll
fontSizenumber
Default: 14
Font sizeAll
fontFamilystringCustom font family. Example: 'Reenie Beanie', cursiveAll
fontFaceUrlstringCustom font URL. Example: https://fonts.googleapis.com/css2?family=Reenie+Beanie&display=swapAll
spacingnumber
Default: 8
Space between components. This also affects avatar size.All
avatarSizeMultipliernumber
Default: 1
Avatar size multiplierAll
userSsoIdstring|numberSee Single Sign-OnAll
getUserSsoTokenfunctionSee Single Sign-OnAll
translationsobjectSee TranslationsDiscussion, User Comments, Site Comments
pageIdstringPage IDDiscussion
pageUrlstringPage URLDiscussion
pageTitlestringPage titleDiscussion
defaultSortIdstring
'best', 'newest', 'oldest'
Default comment sortDiscussion
nbCommentsFirstLoadnumber
Default: 30
Number of comments on the first loadDiscussion
btnAddCommentPositionstring
'top', 'bottom'
Position of button "Add comment"Discussion
btnAddCommentVariantstring
'contained', 'outlined', 'text'
Variant of button "Add comment"Discussion
btnAddCommentSizestring
'medium', 'small', 'large'
Size of button "Add comment"Discussion
newCommentPositionstring
'top', 'bottom'
Position of newly posted commentsDiscussion
targetUserSsoIdstringUser SSO IDUserComments

Comments