DRYL COMPONENTS
Color mode: System — switch to light
2.20.1
Customization

DrylThemeProvider

DRYL theming is seed-driven: you set a couple of accent colors and the whole visual language — fills, glows, focus rings, the AI aura — is derived from them. Want to try it right now? Open the theme switcher in the top bar. Themes are orthogonal to the color mode — the same seeds read correctly in light and dark.

How it works

A DrylTheme only carries seeds — a brand accent (two gradient stops), an optional separate AI accent, and optional semantic and chart-palette overrides. Everything else is derived in dryl.css, so a theme can never drift out of visual coherence. Change a seed and the soft fills, accent lines, glow rings, AI aura and the first two chart series all glide together.

Derived from the current seeds
Neutral Accent Success Warning Danger Streaming…

An AI-aware surface — its aura uses the AI accent, or the brand accent by default.

Switch the theme from the top bar and watch every element above retune at once.

1 · Add the provider

Mount a single DrylThemeProvider once in your layout. It applies the seeds to :root and animates the transition whenever the theme changes. Pass a starting Theme (any DrylThemes preset, or your own).

razor
@* MainLayout.razor (or wherever your app root lives) *@
<DrylThemeProvider Theme="DrylThemes.Nebula" />

2 · Pick a preset — or build your own

Four curated presets ship in the box. Each one sets its accent seeds (plus, where the accent hue would collide with a chart series anchor, a curated chart-slot override):

Nebula
Ember
Verdant
Mono

Building your own is just a DrylTheme with a DrylAccent:

csharp
using DRYL.Components.Theming;

// Two seed colors are all you need — DRYL derives the rest.
var brand = new DrylTheme
{
    Accent = new DrylAccent("#7c5cff", "#22d3ee"),
};

3 · Switch at runtime

Inject IDrylThemeService anywhere and call SetThemeAsync or the SetAccentAsync shortcut. The provider picks up the change and animates. This site's top-bar theme switcher is built exactly like this.

razor
@inject IDrylThemeService Theme

<DrylButton OnClick="@(() => Theme.SetThemeAsync(DrylThemes.Ember))">Ember</DrylButton>
<DrylButton OnClick="@(() => Theme.SetAccentAsync("#f59e0b", "#f43f5e"))">Custom</DrylButton>

Going further · AI accent & semantics

A theme can give AI surfaces their own accent (the aura and indicators only), and can override the semantic status colors. Leave them unset and AI reuses the brand accent while the default semantics apply — so opting in never disturbs existing screens.

csharp
var theme = new DrylTheme
{
    Accent   = new DrylAccent("#7c5cff", "#22d3ee"),

    // Optional: AI surfaces (aura, indicators) get their own accent.
    AiAccent = new DrylAccent("#34d399", "#22d3ee"),

    // Optional: override the semantic status colors.
    Semantic = new DrylSemantic
    {
        Success = "#34d399",
        Warning = "#f59e0b",
        Danger  = "#f43f5e",
        Info    = "#38bdf8",
    },
};
An unhandled error has occurred. Reload x

Reconnecting to the server…

Attempt /

Next try in s