Contents

SystemSettings

Provides read-only access to operating system settings.

These values reflect OS settings, not the application theme override exposed by app.theme. When app.theme is 'system', native UI follows systemSettings.effectiveAppearance; otherwise, combine both as needed.

import { systemSettings } from '@mobrowser/api';

Example 

import { systemSettings } from '@mobrowser/api';

console.log(systemSettings.appearance)
console.log(systemSettings.effectiveAppearance)
console.log(systemSettings.accentColor)

systemSettings.on('effectiveAppearanceChanged', (appearance) => {
  console.log('Effective appearance changed:', appearance)
})

Properties 

accentColor 

readonly accentColor: string;

The system accent color (color used to highlight interactive elements across your device) as an #RRGGBBAA hex string, or an empty string when unavailable. On Linux, this property is always an empty string.

appearance 

readonly appearance: Appearance;

The appearance chosen in the operating system settings.

effectiveAppearance 

readonly effectiveAppearance: EffectiveAppearance;

The resolved light/dark appearance reported by the operating system.

languageCode 

readonly languageCode: string;

The language code reported by the operating system.

The format is platform-dependent. For example, 'en' on macOS, 'en-US' on Windows, and 'en_US.UTF-8' on Linux.

Events 

’effectiveAppearanceChanged' 

on(event: 'effectiveAppearanceChanged', listener: (appearance: EffectiveAppearance) => void): void;
off(event: 'effectiveAppearanceChanged', listener: (appearance: EffectiveAppearance) => void): void;

Emitted when effectiveAppearance changes.

Example 

import { systemSettings } from '@mobrowser/api';

systemSettings.on('effectiveAppearanceChanged', (appearance) => {
  console.log('Effective appearance changed:', appearance)
})

‘accentColorChanged’ 

on(event: 'accentColorChanged', listener: (color: string) => void): void;
off(event: 'accentColorChanged', listener: (color: string) => void): void;

Emitted when accentColor changes.

Example 

import { systemSettings } from '@mobrowser/api';

systemSettings.on('accentColorChanged', (color) => {
  console.log('Accent color changed:', color)
})