Bento Spaces documentation
UI
Two modes
| View (default) | Edit | |
|---|---|---|
| Empty containers | empty space — invisible | dashed outline, +, size badge |
| Filled containers | the widget, nothing else | no chrome: containers with a widget are locked |
| Gaps | empty space | gap box with + ("Fill this space") |
| Shelf ends | nothing | + at the start and the end |
| Selection | — | solid 2px accent outline, resize handles |
| Idle | dims/locks per the view link | never dims while editing |
The toggle is the grid in the space dock; it becomes a ✓ while editing. Kiosk views have no edit toggle. A fresh browser opens in view; the chosen mode is remembered per device in localStorage (bento.mode.v1), so a refresh keeps whichever mode you were in.
Chrome
No separator lines: brand top-left, a space dock top-centre and an account dock top-right. Both are fixed layers over the canvas. The spaces dock (the letters) sits at the bottom centre. Its position is not a setting: it follows the space's orientation.
The bento canvas is its own layer, full 100vw × 100vh, underneath the docks. A horizontal space is centred; a vertical space starts at the top and scrolls behind the docks. Frame padding follows whichever docks are present, so the first and last squares can always clear them.
| Dock | Content | Horizontal space | Vertical space |
|---|---|---|---|
| Space | name + controls | top centre | bottom right, vertical (controls open upwards) |
| Account | notifications + marketplace + settings + account | top right | top right, vertical stack |
| Spaces | letters + + | bottom centre | left rail, vertically centred |
In a vertical space every dock is a vertical strip of the same width: the spaces rail on the left, the account icons stacked at the top right with the avatar nearest the corner (then settings, marketplace, notifications), and the space pill hanging at the bottom right with its controls opening upwards. The space name is dropped there — the pill is just the ⋯ expander with an accessible label — so the rail stays narrow. That keeps the chrome out of the shelf on a smaller screen. Below 720 px the phone toolbar takes over: the space dock expands across the top row and the spaces dock keeps its bottom placement.
The bell shows the unread count. A widget-release notification opens that widget's store page directly; the rest just mark read. Preferences inside the feed can mute feedback, publisher, marketplace or automation notifications; a muted group is not written to the feed.
The two top docks split by ownership. The account dock is always visible. The space dock is anchored by the space name:
| Mode | Space dock |
|---|---|
| View, collapsed | Social ⋯ |
| View, expanded | Social · fullscreen · share · export · pencil · grid |
| Edit | Social · fullscreen · undo · redo · ✓ |
- Hover or keyboard focus expands the space dock in view mode; tapping the name
- toggles it on touch. Tapping outside collapses it. Edit mode pins it open.
- Pencil opens the space details dialog (name, letter, colour, wallpaper, orientation).
- Grid enters edit mode; the button becomes ✓ to leave.
- Share opens the space sharing dialog; export opens the HTML export popup. Together
- with pencil, they are view actions: edit mode hides them so the row stays about editing.
- Fullscreen is hidden when the browser cannot enter fullscreen.
- Undo/redo exist only in edit mode. Zoom lives in Settings, not in this dock.
- On phones fullscreen is omitted; share, export and details are available in the view-mode
- toolbar. Edit keeps undo/redo and the done check.
- The name leaves the brand row; the brand is just “Bento Spaces”. It is tinted with the space
- colour — the same one as its icon in the bottom dock.
- The collapsed pill keeps a small
⋯as an expand affordance; it disappears as soon as the - controls are showing.
Settings holds Appearance (auto · light · dark), Offline widgets (last state or an offline screen), Zoom, Connectors and Automations. The Marketplace is an icon next to the settings gear in the account dock (and a button in the widget picker), so it is one click from the board. The settings icon is a gear. Share and export are space actions and live in the space dock.
The Connectors dialog stores a base URL and an optional bearer token, tests the connection and lists configured services. Each connector shows its cached health as Online · 2 min ago or Unreachable · reason, refreshed once per open when older than five minutes. Set up a Bento Bridge takes a bridge URL/token, checks health, lists /api/devices (falling back to /api/state for a single AC) and keeps a working connector. Pair a new bridge shows a one-time code the bridge redeems at startup, and Show deploy files emits docker-compose.yml, devices.json and .env (with an optional cloudflared service) as copyable text. The built-in Gree AC widget uses a connector to read /api/state, show power and temperatures, and send /api/power. It auto-binds when there is one connector, offers a picker when there are several, polls every 60 s and shows a private state in shared views. The HTTP card turns any connector path into labelled dotted-path fields (or inferred leaves), with Home Assistant, Gree AC and Pi-hole templates. The Home Assistant widget shows one entity and toggles lights/switches via homeassistant.toggle.
Orientation per space
A space is horizontal (shelf grows right) or vertical (its 4×4 squares stack downwards, one per screen — the phone layout). Chosen in the space dialog.
In edit mode each 4-box square carries a dashed outline in the gutter (so filled cards cannot hide it) plus a faint tint, and a small round grip handle (below the square in a horizontal space, on its left in a vertical one). Drag the handle onto another square to reorder whole squares; containers ride along. No guide-grid toggle.
Orientation is a device preference, not part of the space record: a 32:9 panel may show a space vertically while the desktop shows it horizontally, with the same account. It lives in device settings next to appearance and zoom, keyed by space id. The document never changes: the same containers and widgets are projected differently, so switching back and forth loses nothing. The chrome follows the projection: horizontal keeps top/bottom docks, vertical turns them into left/right rails.
Zoom
Zoom is one setting for every space on the device, changed only in Settings → Zoom. It is − level + with a miniature shelf that scales live while you press it, so the result is visible before closing the dialog. Each press changes the shelf by 10%, from 60% to 300% (100% is the default).
- It scales boxes, gaps and widget contents. The bento layer's font-size is
13px × zoom, and widget CSS is authored inem, so text, icons and inner spacing grow with- the box instead of staying small. Sandboxed module frames receive the same font-size and
- should use
em/remfor their own content. - It is a device preference, not per space, stored in localStorage under
bento.settings.v1 → zoom. Every space — and the HTML export — uses it.- Switching spaces or duplicating one does not change it; deleting a space does not reset it.
- The old per-space values (
zooms[spaceId]) migrate once, keeping the value the device was - showing.
- The space dock has no zoom controls: the top dock stays about the space, Settings about the
- device. A paired display has no Settings, so it keeps the saved zoom.
Creating
Nothing on the shelf is selectable text, in view or edit mode: a double-click on a plus or a label cannot highlight half the board. Links and buttons stay clickable, and real inputs stay selectable. The add buttons are a plain +, not a circled control: one centred in an empty container (the 2×2 size hint moves to its top-left corner) and one bare + at each end of the shelf.
The widget picker lists the account's library — enabled built-ins plus installed widgets — with a search box and a Marketplace button. Installing happens in that popup, so the picker never lists the whole catalog. Removing every widget leaves an empty picker that points at the Marketplace.
- Gap
+→ "Fill this space", grouped: - From next door (copies) · Fill it all (whole, rows, columns, cells, half + quarters) ·
- Leave one empty · Half · One cell · Patterns (full-height seams only).
- Partial fills leave the remainder as a new gap box.
- Empty container
+→ widget picker, filtered to widgets whosesizesinclude this - container's size (or
fit: stretch). Choosing one fills the slot and locks the container. - Shelf end
+→ insert a pattern, shifting whole blocks sideways.
Container rules
| State | Move | Resize | Delete |
|---|---|---|---|
| Empty | yes, inside its own 4×4 block only (clamped at the line) | yes, min 1×1, width stops at the square's right edge | yes, leaves a gap |
| Filled | no | no | no |
A container never crosses a block boundary. Inserting a pattern slides whole blocks, so a filled container moves with its block and stays put within it.
Empty containers in view
Empty containers are editor scaffolding. In edit mode they are visible, selectable and keep their place in the grid. In view mode, a shared view and an HTML export:
- an empty container does not render at all
- it does not reserve shelf width or height, so the shelf shrinks to its content
- empty columns before the first widget are pulled away, so a space never opens with blank space
- on the left
The stored layout is untouched — leaving view mode brings every empty container back, exactly where it was. Gaps between filled widgets are preserved, because that spacing is part of the composition.
If the shelf is still wider than the screen, it is centred with safe alignment: the left edge stays reachable and the viewport scrolls, instead of clipping both sides to centre an oversized shelf.
Widget visual language
Widget cards follow the same principles as Android home-screen widgets, translated into Bento Spaces' own tokens:
- Expressive shape. A filled container is a 24px-radius card (
--widget-radius), rounder than - editor chrome, so a widget reads as content rather than a frame.
- Tonal colour, not decoration. Every widget type has one accent (
--w-accentset on the card - from
data-kind): weather blue, sun amber, air teal, markets green, crypto orange, holidays - violet, and so on. It appears only as a soft radial wash from the top-left, never as a border or
- a solid fill — content stays the loudest thing in the card.
- Hierarchy through type, not size alone. Each card uses three roles: an 11px uppercase
- eyebrow, a dominant value (
24–38px, weight 650, tabular numbers) and a 10–11px supporting line. - Space follows the box. Padding is 18px for a 2×2, 14/16px for a 2×1 and 12px for a 1×1, and
- content that cannot fit is dropped by size (a 2×2 forecast shows one day, a 4×2 shows three).
- Light and dark are the same layout. Accents and surfaces come from tokens, so only the tint
- strength differs; nothing is hard-coded per theme.
- Deltas and bands are chips. A market change or an AQI band is a tonal pill, not coloured
- text, which keeps numbers legible on both themes.
- Stale is a frame state. A last-known reading draws its dashed edge on the card (via the
is-staleclass the offline helper sets) so the outline never cuts through the widget's text.
Choosing a tint. Edit space → Widget cards has three choices:
| Choice | Result |
|---|---|
| Auto (default) | each card keeps its per-type accent |
| Neutral | every card is a plain raised surface, no wash |
| Colour | one swatch tints every card in the space |
The choice is stored with the space (widgetTint), so it follows the space across devices, into a share link and into an export.
The HTML export carries data-kind, data-size and the space tint, so an exported card keeps the same tint and padding as the live one.
Configuring a widget
Every container shows a single ⋯ actions button in its top-right corner only in edit mode. It opens the same menu as a right-click:
| Item | What it does |
|---|---|
| Configure widget… | only for widgets with settings; opens their dialog |
| Refresh… | only for widgets that poll; sets this placement's cadence, with Default naming the widget's own interval (e.g. 10 minutes), plus Off and 30 s–1 h |
| Duplicate | only on a filled box: copies the widget into a new container (type + props), starting flush at the right end of the shelf. An empty box has nothing to duplicate, so it only offers Delete |
| Delete / Remove widget | empty box: deletes the box; filled: removes the widget and leaves the box empty |
So a tablet can edit without a context menu, and there is one handle instead of three buttons. The button is hidden until the block is hovered, selected or keyboard-focused; on touch it stays visible while editing.
Configuration itself opens a settings dialog — the same shell, fields and Save/Cancel actions as Edit space, so it looks the same everywhere.
Refresh is a placement setting, not a widget-type setting. The menu's Refresh… entry changes only this box, and the value is stored in that placement's props with its space: the same weather card can refresh every minute in one space and every hour in another. Off loads once and stops polling; Default returns to the widget's own interval. Widgets that do not poll (clock, countdown, note, …) do not offer the entry.
The dialog is generated from the widget's config schema: text, number, boolean, select and multiline fields. Widgets without a schema get no gear (the Gree card's gear opens the connector dialog instead). The gear is shelf chrome, so it is absent in view mode, in a shared view, on a paired display and in an HTML export.
Double-click in view mode is deliberately unused. It is reserved for per-widget shortcuts (open a feed item, expand a chart) without colliding with editing. Nothing opens a settings prompt from view mode any more.
Moving widgets
- Drag the widget body → moves the widget only, container to container, across the space.
- Legal target:
sizescontains the container's size, orstretch. - Illegal target: 50% opacity + red border, drop refused, widget returns.
- Empty space: refused, snaps back.
- Filled target: swaps the two widgets when both fit each other's sizes.
- Remove widget (context menu /
⌫on the widget) → container stays,+returns, undo covers it.
Selection and keyboard
- Click selects;
Shift+click adds; marquee is optional. ⌘Z/⇧⌘Zundo, one entry per gesture.⌫deletes an empty container; on a filled container it removes the widget.⌘Dduplicates selected widgets (empty boxes are skipped); the right-click menu and the⋯menu both offer Duplicate · Delete- (Remove widget when filled), plus Configure when the widget has settings.
- There is no "close gap": unused space is part of the composition and never pulled closed.
Esccancels a drag or closes a popover.
Idle lock
Per view link: after (30 s – 15 min), mode (dim | lock).
- On idle: polling stops, widgets are destroyed, the shelf fades to a neutral cover
- (wallpaper + clock + "tap to resume").
- Wake:
dim→ any tap;lock→ the PIN the owner set on the link. - The transition is a 400 ms fade, so it reads as calm, not as a crash.
Shared view (visitor)
Opening a /v/{token} link shows only the shelf: no brand, no docks, no edit toggle, no selectable text, and a quiet Exit view button so the owner can preview their own link without getting stuck in it. Widgets that were mounted are removed from the DOM by the idle lock; a card asks for the PIN (or "tap to resume" when the link has no PIN). Wrong PIN shows an error and is throttled.
With display: true the same link becomes a device pairing, served at /display/{token}. It is read-only, has no PIN and never idle-locks; the exit button and all edit chrome are gone.
Share dialog (owner)
Opened from the share icon in the space dock.
- One section per space: idle timeout, PIN or no lock, Create link.
- The link is shown once (tokens are stored hashed); copy it from the field.
- Links list: idle, wake, last opened or revoked, with a Revoke button.
- No profiles and no credential intake: sharing is per space (D37 revised).
Panel and mobile
The unit is derived from the viewport, so there is no per-device size setting (the device-wide zoom scales it on top, above):
- Density:
clamp(80, width / 18, 160)— 80 px at a laptop, up to 160 px on a very large screen. - Fill: horizontal
(height − 96 − 3·gap) / 4; vertical the same from width, minus 48 px. - Unit:
max(56, min(density, fill)).
That keeps a 1440×900 desktop at the design 80 px while a short 32:9 panel fills its height.
Display (paired panel)
Space dock → share → Pair a display returns /display/{token}.
- Boots straight into the shelf; the pairing cookie lasts 30 days and the URL can simply be
- reopened after a reboot.
- No top bar, no cursor, no edit or account chrome.
- The spaces dock becomes a left rail; the space dock becomes a right rail holding
- only Fullscreen. Frame padding reserves 96 px on each side.
- Requests a screen wake lock (best effort) and re-requests it when the tab becomes visible.
- Never idle-locks. On a 2560×720 panel the unit is ~142 px, so a 4×4 square is ~605 px tall.
Phone
- A narrow viewport (<720 px) stacks squares vertically unless the space has an explicit
- per-device orientation, and opens in view mode (editing is one tap away).
- The collapsed space pill sits between the brand and account. Expanding it takes over the
- whole top row as a full-width toolbar and hides the brand and account dock until it closes.
- At 390 px wide the unit is 76.5 px; a square is 342 px, so four boxes fit the width and the
- space scrolls through its squares. A 1440×900 desktop stays at 80 px.
- Dock space/add buttons are 44 px; action buttons 40 px.
- View mode sets
touch-action: pan-y(orpan-x) on blocks, so a finger scrolls the space. - Long-press drag in edit mode is deferred; editing on a phone still uses a direct drag.
Square (iPad)
Brand, space and account docks on top, spaces dock below; two blocks visible.
Export (single file)
The export icon in the space dock opens a popup; Download HTML writes one .html file for the current space. The dialog is the future home for export/viewer permissions.
- No JavaScript: theme tokens and widget styles are inlined, block positions are baked in,
- and each widget is snapshotted through its normal renderer. Remote images inside a widget
- stay remote; nothing else calls the server.
- The file opens with the Bento Spaces mark and the space name tinted with its colour.
- Empty boxes are omitted (they are invisible in view mode).
- Sandboxed module widgets cannot run without JS and export as a labelled placeholder.
- Custom wallpapers are embedded as a data URL.
Motion and tone
Calm, dark-first, uniform gap and radius, no drop shadows on containers, outline never border, 120 ms transitions, prefers-reduced-motion honoured everywhere.