Skip to content

Screen

Overview

useScreen(options) wraps the Quasar Screen plugin with additional reactive helpers for responsive design, orientation detection, and fullscreen management.

Usage

javascript
import { useScreen } from '@kalisio/kdk/core.client'

const { Screen, dense, wide, orientation, Fullscreen, toggleFullscreen } = useScreen()

Parameters

ParameterTypeDefaultDescription
options.densestring'sm'Quasar breakpoint name. dense is true when the screen is smaller than this breakpoint.
options.widestring'sm'Quasar breakpoint name. wide is true when the screen is larger than this breakpoint.

Exposed

NameTypeDescription
Screenreadonly ObjectThe Quasar screen object (width, height, breakpoints, etc.). See the Quasar docs for the full shape.
denseComputedRef<boolean>true when the screen width is below the dense breakpoint.
wideComputedRef<boolean>true when the screen width is above the wide breakpoint.
orientationComputedRef<'landscape' | 'portrait'>Current screen orientation derived from width vs height.
Fullscreenreadonly Ref<boolean>true when the browser is in fullscreen mode.
toggleFullscreen()FunctionToggles fullscreen mode. Returns a promise.
lockOrientation(orientation)FunctionLocks the screen orientation if the browser supports it.