RawQuotes
API Reference
Embed the widget

Appearance options

Every field of the widget's appearance object in JavaScript, with values, defaults, dark mode and language.

Appearance options

These are the fields you can pass as appearance to init and update. They are the same settings as on the survey's Appearance tab, described in Appearance and wording; this page adds their names in code, their allowed values and what the tab does not show.

How options combine

Later wins: the survey's saved appearance, then appearance from init, then each update. Only the fields you pass are replaced. A colour you set in your own CSS with a --rq-* variable beats all of them.

Reference

FieldValuesDefaultLive with update
accentColor, backgroundColor, textColor#RRGGBB#4F46E5, #FFFFFF, #111827yes
borderRadiuswhole number, 0 to 2412yes
colorSchemelight, dark, auto (case does not matter)lightyes
dark{ accentColor?, backgroundColor?, textColor? }, or null to removenoneyes (merged)
languageen, pl, de, fr, es, 'auto', or null (English)nullyes
fontFamilysans, serif, mono, or nullnull (the page's font)yes
choiceSizecompact, default, comfortable, large, xldefaultyes
choicesAligncenter, stretchcenteryes
iconchat, bubble, heart, star, megaphone, question_mark, smiley, flag, clipboard, thumbs_upclipboardyes
sectionTitle, ctaLabel, thankYouTexttext, or null for the built-in textnullyes
placement.modefloating, inlinefloatingno, init only
placement.cornerbottom_left, bottom_right; any other value is rejected with a console linebottom_rightyes
placement.offset.x, .ynumber of pixels (the panel allows 0 to 64)20, 20yes
fontFamily takes only the three presets. For any other font, set --rq-font-family in your CSS: see Styling with CSS.

Dark mode

colorScheme decides which look is used: light, dark, or auto, which follows the visitor's device setting (prefers-color-scheme).

The dark object holds the colours to use instead of the built-in dark ones whenever the effective scheme is dark. In dark mode a colour comes from, in order:

  1. dark.backgroundColor / dark.textColor / dark.accentColor;
  2. your own non-default backgroundColor / textColor / accentColor;
  3. the built-in dark defaults.

Borders, the error colour and the text colour on the accent are always calculated.

rawquotes('init', {
  surveyId: 'YOUR-SURVEY-ID',
  appearance: {
    colorScheme: 'auto',
    accentColor: '#4f46e5',
    dark: { backgroundColor: '#0b1020', textColor: '#e5e7eb', accentColor: '#818cf8' }
  }
})

The widget reads the visitor's device, not your site's theme switch. To follow the switch, call update from it, or style html.dark [data-rawquotes] in CSS: see Dark mode.

Language

language takes en, pl, de, fr or es. A region is ignored, so pl-PL and PL both mean pl. An unsupported language falls back to English and writes a console warning.

'auto' reads <html lang> using the same rules, except that an unsupported or missing value falls back to English without a console warning, at init and at every update, and nowhere else. The widget does not watch the attribute, so a site that changes language on the page has to say so:

// <html lang="de-AT">
rawquotes('init', { surveyId: 'YOUR-SURVEY-ID', appearance: { language: 'auto' } }) // German
// the site switches its language:
rawquotes('update', { appearance: { language: 'auto' } }) // reads <html lang> again
rawquotes('update', { appearance: { language: 'pl' } })   // or say it directly

Only the widget's own interface is translated: buttons and messages. The text of your questions, sectionTitle, ctaLabel and thankYouText are shown exactly as you wrote them.

Copyright © 2026