Skip to main content

DevicePreferencesValue

The device and accessibility preferences the interface adapts to.

This is an interface exported by @mapcairn/core, checked against version 0.2.0.

Signature​

import type { DevicePreferencesValue } from "@mapcairn/core";

interface DevicePreferencesValue

Properties​

finePointer​

readonly finePointer: boolean;

The primary input is a fine pointer that can hover, such as a mouse.

languages​

readonly languages: readonly string[];

The languages the browser prefers, as BCP 47 tags, most preferred first (navigator.languages). Empty where there is none, as on the server. The language setting follows them while the person has made no choice.

online​

readonly online?: boolean;

Whether the browser says the device has a connection. A hint only: a device can report online with no route, and no request is made to check. Undefined, and so treated as online, where an adapter has no signal (the server, or a host that does not report it), so read it as online !== false.

reducedMotion​

readonly reducedMotion: boolean;

The user asked the system to reduce motion.

Source: packages/core/src/ports/preferences.ts:4