Custom bottom sheets
A custom bottom sheet is a layout of components that slides up from the bottom over the screen you are on. Use it for quick controls that do not need a whole screen: the lights of one room, a confirm panel, or a short details view. The screen behind it stays visible and keeps updating.
A bottom sheet works like a custom screen: you design two layouts, pick a default data source, and pass values when it opens. It differs in size, in how it closes, and in the tap action that opens it.
Create a bottom sheet
Open the menu → Data → Custom bottom sheets, then tap Add bottom sheet.
- Name (required, unique among bottom sheets) and Description (required) — as on a custom screen.
- Default root data source — the data source components use unless they pick another one. Open bottom sheet can replace it.
- Title bar — shows the sheet name and a close button above your components.
- Drag handle, Close on tap outside, Close on swipe down — how the sheet can be closed (see below).
- Data — your own notes or data, up to 5120 characters, as plain text or JSON. It is stored as is and not evaluated, and scripts cannot read it. Don't put secrets there. It is the last setting and is not the same as Description.
Save with the check in the top bar. In the list, long-press a sheet to duplicate or delete it. Swipe a row right to left to delete it.
Without Pro you can use two bottom sheets and two custom screens, with up to 30 components across all of them (both layouts count). A group counts as one, and so does each component inside it. When you reach a limit, the app opens Plans. Sheets you already have over a limit keep working, and you can still edit them. See Plans.
Layouts and height
Each bottom sheet has a Vertical layout (device upright) and a Horizontal layout (device on its side). If one is Empty, the sheet uses the other one.
Open a layout to design it, the same way as on a custom screen. Above the canvas, pick the Sheet height of that layout as a share of the window height:
- 25%, 50%, or 75%.
- Custom — any value from 15% to 400%. Above 90% the sheet stops growing at 90% of the window and you scroll its contents.
The sheet is as wide as the screen, up to a comfortable width on a wide screen such as iPad, where it is centered. Your components fill the sheet. Keep them a little in from the edges.
Turn on Title bar to show the sheet name and a close button at the top. It stays in place while the contents scroll, and the canvas gets that much shorter. Without it, add your own title or close button as components.
Closing a bottom sheet
- Title bar — its close button closes the sheet.
- Drag handle — shows the small bar at the top. Pulling it down closes the sheet.
- Close on tap outside — a tap outside the sheet closes it. On iPad with a keyboard, Esc does too.
- Close on swipe down — swiping the sheet down closes it. In a sheet that scrolls, a swipe scrolls first.
To close the sheet from a button, give a component the Close screen tap action. If you turn off the title bar and all three switches, add such a button, or nothing can close the sheet.
Close screen closes the screen set in Screen to close. The default, This screen, closes the sheet the button is on, even if another screen was opened over it in the meantime. You can also close the screen on top, a custom screen or bottom sheet you pick, or all screens. Screens opened over the one being closed close too. The main screen never closes. If a screen has unsaved changes, you are asked first.
Close screen can also send a value back to the tap that opened the sheet: fill in its Result. Set screen result stores a value without closing, so the opener gets it however the sheet closes. See Returning a value.
On open and On close work on a bottom sheet the same way as on a custom screen: in the designer, with nothing selected, open Events. Every way of closing counts — the title bar button, the handle, a tap outside, a swipe down, or Close screen — so On close always runs and can still set the result. See On open and On close.
Open a bottom sheet from a tap
On a data piece or a component, add the Open bottom sheet tap action, pick the sheet, then set Sheet parameters. Parameters work exactly like screen parameters on a custom screen: params.room, {{ params.room }}, or $.params.room, with source choosing the data source. See Screen parameters.
The tap actions after Open bottom sheet run when the sheet closes. Apply result puts the value the sheet returned in value or a ctx key. If closed without a result chooses whether the next actions still run (Continue) or not (Stop actions). See Returning a value.
A sheet can open a custom screen or another sheet, and a custom screen can open a sheet; each opens on top. If a tap points at a sheet that was deleted, the action shows Missing bottom sheet until you change it.
You can also open a sheet with a link: routixdash://custom-sheet/<id>. See Links.
Bottom sheet vs custom screen
| Custom bottom sheet | Custom screen | |
|---|---|---|
| Covers | Part of the window; the screen behind stays visible | The whole window |
| Size | Sheet height in % of the window | Aspect ratio |
| Title bar | Optional (Title bar switch) | Yes, with the name |
| Closes with | Title bar button, handle, tap outside, swipe down, or Close screen | Back or Close screen |
| Opened by | Open bottom sheet | Open screen |