Creating elements

Elements are the widgets on your desktop. Each one is an HTML template with live data, styled with Tailwind CSS.

Files

my-element/
├── manifest.json     name and the data it needs
├── template.liquid   the HTML
└── preview.png       shown in the element picker (512 × 320)

Quick start

  1. In Settings, turn on Developer Mode.
  2. Go to Elements › Create New Element, name it and choose its data.
  3. Open template.liquid in any code editor. The draft updates on your desktop each time you save.
  4. When it's ready, select Publish Element to add it to your library.

Example

template.liquid
{% assign load = cpu.used_percent | round %}

<div class="w-full h-full p-4 rounded-2xl bg-black/{{ theme.opacity }}">
  <span class="text-{{ theme.color }}-300">CPU</span>
  <span class="text-4xl tabular-nums">{{ load }}%</span>
</div>

Where files live

Everything is in %APPDATA%\StormGauge\: drafts in draft-elements, your library in elements, and themes in themes. The built-in elements in elements are good examples to learn from.

To share elements, add them to a theme and Export it as a ZIP. Check the rules first.