navigator.preferences returns a PreferenceManager for the current document. Learn MDN’s colorScheme.value check, related preference objects, secure-context notes, matchMedia fallbacks, five examples, and try-it labs.
01
Kind
Read-only property
02
Returns
PreferenceManager
03
Status
Experimental
04
Example
colorScheme
05
Context
Often HTTPS
06
Fallback
matchMedia
Fundamentals
Introduction
Users set system preferences for dark mode, reduced motion, contrast, and more. CSS already exposes many of these via prefers-* media queries. The experimental User Preferences API adds a JavaScript entry point on navigator.preferences.
Reading navigator.preferences gives you a PreferenceManager. From there you can inspect preference objects such as colorScheme (for example .value === "dark" or "light").
💡
Progressive enhancement
Treat this API as optional. Most sites can already theme with @media (prefers-color-scheme: dark) or matchMedia("(prefers-color-scheme: dark)").
Concept
Understanding the preferences Property
navigator.preferences is not a Boolean. It is a manager object for user preference media settings. MDN lists PreferenceManager accessors such as:
navigator.preferences is Experimental and not Baseline. Support is limited and evolving. Always feature-detect and keep matchMedia / CSS prefers-* fallbacks.
✓ Experimental · Not Baseline
Navigator.preferences
Safe to explore for learning. Do not require the User Preferences API for core theming or accessibility.
LimitedExperimental
Google ChromeCheck current experimental / flag status
Limited
Mozilla FirefoxTypically unavailable — use matchMedia
Unavailable
Apple SafariTypically unavailable — use matchMedia
Unavailable
Microsoft EdgeFollow Chromium experimental status
Limited
OperaFollow Chromium experimental status
Limited
Internet ExplorerNo User Preferences API support
Unavailable
preferencesLimited
Bottom line: Feature-detect navigator.preferences, try colorScheme when present, and rely on matchMedia/CSS prefers-* for everyone else.
Wrap Up
Conclusion
navigator.preferences is an experimental entry point to PreferenceManager. Learn MDN’s colorScheme.value pattern, feature-detect carefully, and keep CSS / matchMedia as your production baseline.
Ship experimental overrides without graceful fallbacks
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about preferences
Experimental PreferenceManager — enhance, do not depend.
5
Core concepts
⚙️01
Returns
PreferenceManager
Type
🌙02
Example
colorScheme
API
⚗️03
Status
experimental
Caution
🔒04
HTTPS
often required
Context
🎯05
Fallback
matchMedia
Reliable
❓ 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 (and sometimes overriding) user preference media 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.
Related PreferenceManager / PreferenceObject features are documented as secure-context (HTTPS or localhost) in supporting browsers. Prefer testing on HTTPS.
No. The property is read-only. You use the returned PreferenceManager and its PreferenceObject methods (for example requestOverride where supported).
Did you know?
The User Preferences API is designed to align with CSS preference media queries such as prefers-color-scheme and prefers-reduced-motion — giving JavaScript a structured way to read (and sometimes override) the same ideas.