IDisplayInstance

interface
Display & Responsive

Reactive display service — the object returned by useDisplay(). Exposes reactive breakpoint flags, current viewport dimensions, platform detection and an update() method for manual refresh.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

xs
required
Ref<boolean>
True when the viewport is in the xs range.
sm
required
Ref<boolean>
True when the viewport is in the sm range.
md
required
Ref<boolean>
True when the viewport is in the md range.
lg
required
Ref<boolean>
True when the viewport is in the lg range.
xl
required
Ref<boolean>
True when the viewport is in the xl range.
xxl
required
Ref<boolean>
True when the viewport is in the xxl range.
smAndUp
required
Ref<boolean>
True when viewport width >= sm threshold.
mdAndUp
required
Ref<boolean>
True when viewport width >= md threshold.
lgAndUp
required
Ref<boolean>
True when viewport width >= lg threshold.
xlAndUp
required
Ref<boolean>
True when viewport width >= xl threshold.
smAndDown
required
Ref<boolean>
True when viewport width < md threshold.
mdAndDown
required
Ref<boolean>
True when viewport width < lg threshold.
lgAndDown
required
Ref<boolean>
True when viewport width < xl threshold.
xlAndDown
required
Ref<boolean>
True when viewport width < xxl threshold.
name
required
Ref<TBreakpoint>
Current active breakpoint name (xs | sm | md | lg | xl | xxl).
height
required
Ref<number>
Reactive viewport height in pixels.
width
required
Ref<number>
Reactive viewport width in pixels.
mobile
required
Ref<boolean>
True when the current breakpoint is at or below the configured mobileBreakpoint.
mobileBreakpoint
required
Ref<number | TBreakpoint>
Active mobile breakpoint value (reactive).
platform
required
Ref<IDisplayPlatform>
Reactive platform detection snapshot.
thresholds
required
Ref<TDisplayThresholds>
Reactive named breakpoint thresholds in pixels.
ssr
required
boolean
Static flag indicating server-side rendering context (non-reactive).

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Consuming the display instance in a component

typescript