Dark mode
Forms match the website or app they appear in. When your product is dark, the form is dark, with no code. Authors can lock a form or change its dark colour in the console, and developers can force a theme from code.
Who decides
Three settings decide whether a form is light or dark. The first one that is set wins:
| Order | Setting | Where |
|---|---|---|
| 1 | Developer theme (light or dark) | Your code: init option or setTheme() |
| 2 | Form lock (Always light / Always dark) | Console → form builder → Theme tab → Dark mode |
| 3 | Match app (the default) | Detected from your site or app |
A developer theme of auto (the default) means "no override", so the form lock and then detection apply.
Automatic detection
Websites (script tag, React, Vue)
The SDK checks your page in this order:
- A
darkorlightclass, ordata-theme,data-mode,data-color-schemeordata-bs-themeset todarkorlight, on<html>or<body>. This covers Tailwind, next-themes, Bootstrap and most theme toggles. - A
color-scheme: darkstyle on the page. - The page's own background colour: a dark background means a dark form.
- The visitor's OS setting, but only when your page opts in with
color-scheme: light dark. An unstyled page stays white in dark OS mode, so the form stays light too.
Open forms switch live when your page or the visitor's OS setting changes.
Mobile apps
- Android: the screen's dark theme or night mode, including
AppCompatDelegate.setDefaultNightMode. - iOS: the screen's colour scheme, including
overrideUserInterfaceStyle. - React Native: the app's setting, including
Appearance.setColorScheme. - Flutter: inline forms use your
Theme's brightness. Popups follow the phone's setting.
Use code when your site's theme toggle doesn't use any of the markers above, or when your Flutter app forces a theme in Dart. Also use it when your Android app has only a light theme but the phone is in night mode. Call setTheme whenever your own theme changes.
Console settings
Each form has a Dark mode group in the builderEach form has a Dark mode group in its design settings:apos;s Theme tab:
- Match app (default), Always light or Always dark.
- Dark background: the card colour in dark mode, default
#18181b. Text, borders and greys are worked out from it so they stay readable. If your brand colour is too dark to see on it, selected answers use a lighter shade.
Use the Light app / Dark app switch above the builder preview to check both looks. Shared link pages follow the visitor's phone or computer setting.
From code
Values are auto (default), light and dark. Changing it switches forms that are already open.
Script tag
intunix('init', 'int_pk_xxx', { theme: 'auto' });
intunix('setTheme', 'dark');React
<IntunixProvider apiKey="int_pk_xxx" theme={isDark ? 'dark' : 'light'}>
{children}
</IntunixProvider>
<FeedbackForm content={content} theme="dark" />Vue
<IntunixProvider api-key="int_pk_xxx" :theme="isDark ? 'dark' : 'light'">Android
Intunix.init(this, "int_pk_xxx", IntunixOptions(theme = IntunixTheme.Auto))
Intunix.setTheme(IntunixTheme.Dark)
IntunixForm("post-order", theme = IntunixTheme.Light)iOS
Intunix.initialize(apiKey: "int_pk_xxx", options: IntunixOptions(theme: .auto))
Intunix.setTheme(.dark)
IntunixForm(form: "post-order", theme: .light)React Native
Intunix.initialize('int_pk_xxx', { theme: 'auto' });
Intunix.setTheme('dark');
<IntunixForm form="post-order" theme="light" />Flutter
Intunix.initialize('int_pk_xxx', options: const IntunixOptions(theme: IntunixTheme.auto));
Intunix.setTheme(IntunixTheme.dark);
IntunixForm(form: 'post-order', theme: IntunixTheme.light);Versions
Dark mode needs web SDK 1.6.0 (@intunix/core, @intunix/react, @intunix/vue, cx.js), Android 1.6.1, iOS 1.6.0, React Native 1.6.0 or Flutter 1.6.0. Older SDKs ignore the setting and show forms light. Kiosk mode is always light. See Mobile apps for installing the mobile SDKs.