Skip to content

Examples

Each example is a complete widget. Templates run here on made-up readings, with the same renderer as your dashboard: edit the code and see the result, or reset it. Every example downloads as a package you can open in the editor or publish.

Templates

A reading

Show one temperature, formatted for the viewer.

Conditional state

Pick a word and a colour from the temperature: cool, comfortable or warm.

An action

Switch a light and set its brightness, without JavaScript.

A setting

Let each tile choose its own label.

Responsive layout

Readings sit side by side on a wide tile and stack on a tall one; a small tile keeps only the temperature.

A reusable partial

Draw a labelled reading with the built-in value-row partial.

Missing data

Say what’s going on when a sensor has no reading.

A widget popup

Keep the tile small and put the extra controls in a popup.

JavaScript

These run in a dashboard only. Their code is shown in full, but doesn’t run on this site.

A chart of recorded power

Load recorded history, then append live readings using the tiledash JavaScript API.

Read an external JSON feed

Fetch synthetic weather data from a declared host, validate the response and show an unavailable state on failure.

More templates

Climate with a sparkline

A reading with its recent history as a small chart.

Clock that wakes on motion

Show more when someone is near.

Comfort with details

Tap the number to swap a sparkline for more readings.

Comfort word with expressions

The conditional example written with let and the ternary operator.

Every reading in a list

Loop over all of a device’s capabilities.

Tabs

Split readings over tabs, remembering the chosen one in state.

Thermostat steps

Raise and lower a target temperature, with a sending hint.