Styling
Style elements with Tailwind CSS v3 classes. Tailwind runs live, so classes can include template data.
<div class="bg-{{ theme.color }}-950/{{ theme.opacity }} w-[37%]"
style="height: {{ pct }}%">Theme variables
Use these so an element follows the user's theme settings.
| Variable | Use for |
|---|---|
theme.color | Accents, bars and gauges: text-{{ theme.color }}-500 |
theme.opacity | Panel backgrounds only: bg-black/{{ theme.opacity }}. At 0, text sits on the wallpaper, so keep it readable. |
| Light and dark | Handled by the app. Pair colours with dark: variants. |
| Font and weight | Applied automatically. Don't set a font-family. |
Sizing
Users resize elements, so make the root w-full h-full overflow-hidden and avoid fixed pixel sizes. SVG with a viewBox scales well for gauges and charts.
Motion
transition-all duration-700smooths each data update.animate-spin,animate-ping,animate-pulseandanimate-bouncework, tuned with classes like[animation-duration:6s].- Custom
@keyframesaren't possible. Addmotion-reduce:animate-none.
Hover
Hover effects only work while the desktop is unlocked, so don't hide anything important behind them.

