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.

VariableUse for
theme.colorAccents, bars and gauges: text-{{ theme.color }}-500
theme.opacityPanel backgrounds only: bg-black/{{ theme.opacity }}. At 0, text sits on the wallpaper, so keep it readable.
Light and darkHandled by the app. Pair colours with dark: variants.
Font and weightApplied 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-700 smooths each data update.
  • animate-spin, animate-ping, animate-pulse and animate-bounce work, tuned with classes like [animation-duration:6s].
  • Custom @keyframes aren't possible. Add motion-reduce:animate-none.

Hover

Hover effects only work while the desktop is unlocked, so don't hide anything important behind them.