navigator.preferences is a read-only property that returns a PreferenceManager for the current document — the entry point to the experimental User Preferences API(MDN).
Read the notes below before you rely on this property. Prefer feature detection when support is limited.
Syntax
Use navigator.preferences. Start with this line.
JavaScript
navigator.preferences
Call
What it does
navigator.preferences
Primary signature.
Built into the browser. Read navigator.preferences on Navigator — no import required.
Try the new API. Use colorScheme.value when present.
Fall back.matchMedia is widely available and reliable.
Return a boolean. Easy to wire into theme toggles.
Best practice. Ship CSS prefers-color-scheme even when JS runs.
Compatibility
Browser Support
navigator.preferences is marked Experimental on MDN. It is not Baseline. Expect missing support in current mainstream browsers — feature-detect and keep matchMedia / CSS fallbacks.
✓ Experimental · Limited support
Navigator.preferences
Returns a PreferenceManager for the User Preferences API. Use only as an optional enhancement; stable theming should rely on prefers-* media queries.
LimitedExperimental
Google ChromeExperimental / limited or unavailable
Limited
Mozilla FirefoxExperimental / limited or unavailable
Limited
Apple SafariExperimental / limited or unavailable
Limited
Microsoft EdgeExperimental / limited or unavailable
Limited
OperaNot a production dependency
Limited
Internet ExplorerNot available
No support
preferencesExperimental
Bottom line: Do not ship production theme logic that requires navigator.preferences. Detect it when present; always fall back to matchMedia and CSS.
Frequently Asked Questions
It is a read-only Navigator property that returns a PreferenceManager object — the entry point to the experimental User Preferences API for reading user preference settings such as color scheme.
MDN marks it Experimental. It is not Baseline. Always feature-detect and keep a fallback such as CSS prefers-* media queries or window.matchMedia.
MDN’s pattern: if (navigator.preferences.colorScheme.value === "dark") { /* dark */ } else { /* light */ }. Feature-detect navigator.preferences first.
PreferenceManager can provide PreferenceObject accessors such as colorScheme, contrast, reducedMotion, reducedTransparency, and reducedData — corresponding to prefers-* media queries.
PreferenceManager is documented as a secure-context feature (HTTPS or localhost) in supporting browsers. Prefer testing on HTTPS.
No. The property is read-only. You use the returned PreferenceManager and its PreferenceObject properties (for example colorScheme.value).