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

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

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

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Consuming the display instance in a component

typescript