Wrap the page or a box in Screensaver, and put a scene in the overlay.
The sample also uses Bounce. One command adds them with this item:
lobby-screensaver.tsx
Screensaver
| Prop | Type | Default | Description |
|---|---|---|---|
| timeout | number | 60_000 | How long the page must have no input before it shows, in ms. Default 60 000 (1 minute). |
| active | boolean | — | Shown or not (controlled). The machine still asks through onActiveChange. |
| default | boolean | false | Shown at first (uncontrolled). Default false. |
| on | — | Called when the idle timer, a wake, or the Trigger shows or hides it. | |
| disabled | boolean | false | Stops the idle timer. The Trigger and active still show it. |
| children | ReactNode | — | |
ScreensaverOverlay
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| container | "page""parent" | "page" | page (default): fixed over the whole page, in a portal on document.body. parent: fills the nearest positioned box (give it relative and its corners). |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
ScreensaverScene
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| seed | number | 1 | The random look of the scene: the same seed draws the same start. Default 1. |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
ScreensaverHint
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| hide | number | false | HINT_HIDE_AFTER | When the hint fades out, in ms after it shows; false keeps it. Default 3000. |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
ScreensaverTrigger
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| glass | "clear""dark""light" | — | |||||
| rounded | "default""full" | — | |||||
| size | "default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs" | — | |||||
| variant | "dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary" | — | |||||
| class | string | — | |||||
| busy | boolean | — | The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading. | ||||
| spinner | "center""start" | — | center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label. | ||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
| Any key | Wakes it. The key does not reach the focused field. |
|---|
Built with
Installs with Screensaver











