Screensaver Pro

Part of Pro. Versions up to 0.10 of the open source package include it under MIT; later releases keep it in Pro.

Idle-screen overlay with a live clock and date; click to dismiss.

Jump to API reference

Import

Vue
import { UiScreensaver } from '@ziyarago/ui-pro/vue'

Default

Vue
<UiScreensaver
  hint="Tap anywhere to continue"
  :open="open"
  @close="open = false"
 />

Locale

Vue
<UiScreensaver
  locale="en-US"
  hint="Touch to wake"
  :open="open"
  @close="open = false"
 />

API reference

Full-screen idle screen with a large clock, date and an optional logo; show it after inactivity.

Props

PropType and valuesDefaultDescription
openbooleanfalseShows the screensaver when true; renders nothing when false.
localestring'en-GB'BCP 47 locale for the date line.
hintstring—Small hint under the date, e.g. "Tap to continue".
logostring—URL of an image shown above the clock. Use an absolute URL or a root-relative path such as "/brand/logo.svg". Nothing is shown when it is not set, so the screensaver never requests a missing file.
idleMsnumber0When greater than 0 and the screensaver is closed, a hidden sentinel listens for pointer, key, wheel and touch activity and calls idle after this many milliseconds without any. 0 disables it.

Events

Vue: @name. React: onName.

closeCalled on click or any key (including Escape) while open.
idleCalled once the idleMs period passes without activity while closed; set open to true in the handler.

Notes

  • The clock re-renders from one interval created when the screensaver opens and cleared when it closes; the idle timer is re-armed on each interaction. Nothing runs during server rendering.