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.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- xsrequiredRef<boolean>
- True when the viewport is in the xs range.
- smrequiredRef<boolean>
- True when the viewport is in the sm range.
- mdrequiredRef<boolean>
- True when the viewport is in the md range.
- lgrequiredRef<boolean>
- True when the viewport is in the lg range.
- xlrequiredRef<boolean>
- True when the viewport is in the xl range.
- xxlrequiredRef<boolean>
- True when the viewport is in the xxl range.
- smAndUprequiredRef<boolean>
- True when viewport width >= sm threshold.
- mdAndUprequiredRef<boolean>
- True when viewport width >= md threshold.
- lgAndUprequiredRef<boolean>
- True when viewport width >= lg threshold.
- xlAndUprequiredRef<boolean>
- True when viewport width >= xl threshold.
- smAndDownrequiredRef<boolean>
- True when viewport width < md threshold.
- mdAndDownrequiredRef<boolean>
- True when viewport width < lg threshold.
- lgAndDownrequiredRef<boolean>
- True when viewport width < xl threshold.
- xlAndDownrequiredRef<boolean>
- True when viewport width < xxl threshold.
- namerequiredRef<TBreakpoint>
- Current active breakpoint name (xs | sm | md | lg | xl | xxl).
- heightrequiredRef<number>
- Reactive viewport height in pixels.
- widthrequiredRef<number>
- Reactive viewport width in pixels.
- mobilerequiredRef<boolean>
- True when the current breakpoint is at or below the configured mobileBreakpoint.
- mobileBreakpointrequiredRef<number | TBreakpoint>
- Active mobile breakpoint value (reactive).
- platformrequiredRef<IDisplayPlatform>
- Reactive platform detection snapshot.
- thresholdsrequiredRef<TDisplayThresholds>
- Reactive named breakpoint thresholds in pixels.
- ssrrequiredboolean
- 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