For the complete documentation index, see llms.txt. This page is also available as Markdown.

Dark mode

Availability

Overview

Orbeon Forms provides dark mode support across Form Runner and Form Builder. When enabled, a modern, high-contrast dark theme is applied to form views and administrative pages, making forms more comfortable to view in low-light environments and aligning with system-wide dark mode preferences.

Dark mode is available for the following pages:

  • Detail page: Form view, edit, and new modes

  • Summary page: Form data summary table

  • Landing page: Application landing page

  • Published Forms page: Listing of published forms

  • Forms Admin page: Form management and admin operations

  • Form Builder: Form editor, including its dialogs and toolbox [SINCE Orbeon Forms 2026.1]

Detail page in dark mode
Landing page in dark mode
Summary page in dark mode

[SINCE Orbeon Forms 2026.1]

User interface

Form Runner includes a color scheme selector in the top navigation bar next to the language selector:

  • The selector dropdown displays an icon matching the active mode:

    • Sun icon: Light mode

    • Moon icon: Dark mode

    • Half-circle icon: Auto (system preference)

  • The dropdown menu allows users to switch between three options:

    • Light: Forces the light color scheme.

    • Dark: Forces the dark color scheme.

    • Auto: Automatically follows the user's operating system or browser preference (prefers-color-scheme).

Selecting an option switches the color scheme dynamically without reloading the page.

Persistence

When a user selects a color scheme from the navigation bar, their choice is saved to a cookie named orbeon-color-scheme.

This preference is remembered across page navigations, form submissions, and subsequent visits.

Configuration

The navigation bar color scheme selector is enabled by default for all Form Runner forms:

You can disable the selector globally or per application/form by setting the property to false:

The selector also appears in the Form Builder navigation bar. To hide it there only, set the property for the orbeon/builder application and form names:

The selector is automatically hidden in the following situations:

  • When running in test mode (fr:mode() = 'test')

  • When the form is embedded into another page or application (fr:is-embedded())

Color scheme determination at runtime

[SINCE Orbeon Forms 2026.1]

When Form Runner renders a page, the effective color scheme (light, dark, or system) is determined according to the following order of precedence:

  1. URL parameter: If the fr-color-scheme query parameter is present in the request URL (e.g. ?fr-color-scheme=dark or ?fr-color-scheme=system), its value is used. This allows external applications or portal links to explicitly request a specific scheme.

  2. Cookie: If the orbeon-color-scheme cookie is present (such as when set by the navigation bar selector), its value is used.

  3. Session attribute: If the fr-color-scheme attribute is set on the HTTP servlet session, its value is used.

  4. Configuration properties: If none of the above are set, the value of the oxf.fr.style.color-scheme property is used (see below).

  5. Default: If no property is configured, Form Runner defaults to light.

Configuration properties

Default color scheme

[SINCE Orbeon Forms 2025.1]

You can set the default color scheme used when no user selection, cookie, or URL parameter is present.

Supported values:

  • light (default): Light color scheme.

  • dark: Dark color scheme.

  • system: Automatically selects between light and dark schemes based on the user's browser or operating system preference.

For Form Runner Detail pages, configure oxf.fr.style.color-scheme.*.*:

You can customize this per application and form name using the standard property wildcards (e.g., oxf.fr.style.color-scheme.acme.order).

For other pages (Summary, Landing, Published Forms, and Forms Admin pages), use the property without wildcards:

[SINCE Orbeon Forms 2026.1]

Controls whether the color scheme selector appears in the navigation bar.

See also

Last updated