A widget popup
Keep the tile small and put the extra controls in a popup.
<button data-hd-on-click="openPopup('details')">More controls</button><hd-popup id="details"> <hd-slider bind="{{ cap.dim }}" label="Brightness"></hd-slider> <button data-hd-on-click="closePopup()">Done</button></hd-popup>The preview runs on a made-up light.basic device, so you don’t need a Homey. Edit the template or style to try something; actions don’t reach a device here.
How it works
hd-popup holds markup that only shows when opened. openPopup('details') opens it by its id and closePopup() closes it. The popup shares the widget’s device, settings, style and state.
The popup opens on a dashboard; this preview shows the tile.
Files
<button data-hd-on-click="openPopup('details')">More controls</button><hd-popup id="details"> <hd-slider bind="{{ cap.dim }}" label="Brightness"></hd-slider> <button data-hd-on-click="closePopup()">Done</button></hd-popup>:host { display: flex; flex-direction: column; gap: 12px; padding: 12px;}p { margin: 0;}.reading { font: var(--hd-number-weight) 36px var(--hd-font-display);}button { color: var(--hd-text); background: var(--hd-surface); border: 1px solid var(--hd-border); padding: 10px; border-radius: var(--hd-control-radius);}{ "id": "@your-handle/popup-controls", "title": "A widget popup", "summary": "Keep the tile small and put the extra controls in a popup.", "version": "1.0.0", "licence": "MIT", "tags": [], "kind": "widget", "widget": { "kind": "device", "match": { "classes": [ "light" ], "requires": [ "onoff" ], "optional": [ "dim", "light_temperature", "light_hue", "measure_power" ] }, "size": { "default": [ 3, 4 ], "min": [ 1, 1 ], "max": [ 6, 8 ] }, "align": { "x": "start", "y": "end" }, "settings": [ { "name": "showWarmth", "label": "Colour temperature slider", "required": true, "group": "content", "type": "boolean", "default": true }, { "name": "tileTap", "label": "The light", "required": false, "group": "tap", "type": "tap", "gesture": "tap", "default": { "type": "toggle" }, "hold": { "type": "device" }, "double": { "type": "none" }, "allow": [ "toggle", "device", "dashboard", "flow", "mood", "variable", "request" ] } ], "basedOn": "light.basic" }}Use it
In the editor, start from the widget it’s based on and paste the template and style; or unzip the package, replace your-handle with your name in the Community and publish it. Build your first widget walks through both.
Read more: Widget popups · Actions · Components