Table of Contents

Class VelvetTheme

Namespace
Velvet
Assembly
Velvet.Docs.dll

Global theme state backing the dark: utility variant. This models a class-based dark-mode strategy as a single application-wide flag rather than scanning for an ancestor .dark class (UI Toolkit has no class-change event to react to cheaply).

Set IsDark from your app (e.g. on a settings toggle); every mounted element with a dark: variant re-evaluates its payload when the value changes.

public static class VelvetTheme
Inheritance
object
VelvetTheme

Remarks

Equivalent to Tailwind CSS's class-based dark-mode strategy for users migrating from Tailwind.

Properties

IsDark

Whether dark mode is active. Setting it notifies DarkModeChanged.

Events

DarkModeChanged

Raised whenever IsDark changes.