Theming

Change how the panel looks with a theme file

The panel is built with StellarAdmin.UI and uses its themes. A theme is a CSS file of variables that you load after the panel's own stylesheet:

builder.Services.AddStellarAdmin(admin =>
{
    admin.AddStylesheet("https://fonts.googleapis.com/css2?family=Lexend:wght@400..700&display=swap");
    admin.AddStylesheet("~/css/theme.css");
});

Stylesheets load after the panel's, in the order you add them. Add any web fonts your theme needs the same way.

To make a theme:

See theming in the StellarAdmin.UI docs for how themes work, and dark mode for the light and dark variants.

Form layout

How form sections look is a panel setting rather than part of the theme:

admin.ConfigureUI(ui => ui.ConfigureForms(forms => forms.SectionLayout = FormSectionLayout.Card));

See form layout.

Scripts

AddScript adds your own scripts to every panel page, after the panel's:

admin.AddScript("~/js/admin.js");

On this page