Skip to main content
Partas

Idle

createIdleTimer

let createIdleTimer(
?idleTimeout: int,
?promptTimeout: int,
?onIdle: Event -> unit,
?onPrompt: Event -> unit,
?onActive: Event -> unit,
?startManually: bool,
?events: Event[],
?element: HtmlElement
): IdleTimer

Provides different accessors and methods to observe the user's idle status and react to its changing.

IdleTimer

type IdleTimer = interface
member isIdle: Accessor<bool>

Report user status.

member isPrompted: Accessor<bool>

Report user status.

member start: unit -> unit

Start the timer.

member stop: unit -> unit

Stop the timer.

let reset: unit -> unit

Reset the timer.

let triggerIdle: unit -> unit

Manually sets isIdle to true and triggers onIdle callback (with custom manualidle event).

Last updated: 7/11/25, 1:35 AM

PartasBuilt using the Partas.SolidStart SolidBase template
Community
githubdiscord