Configuration

All AdminLTE settings live in the strongly-typed AdminLteOptions class, bound from the "AdminLte" section of appsettings.json via the Options pattern when you call AddAdminLte(builder.Configuration).

AdminLteOptions

Every property maps directly to a key under the AdminLte section. The section name constant is AdminLteOptions.SectionName ("AdminLte").

PropertyTypeDefaultPurpose
BrandTextstringAdminLTE 4Text shown next to the sidebar logo.
BrandUrlstring/URL the brand/logo links to.
LogoImagestring?nullOptional logo image URL; a placeholder square renders when null.
SidebarThemestringdarkSidebar color theme: dark or light.
SidebarBreakpointstringlgBreakpoint at which the sidebar expands: sm/md/lg/xl/xxl.
LayoutFixedbooltrueApply the layout-fixed class (sticky wrapper, scrollable content).
FixedHeaderbooltrueApply the fixed-header class.
FixedFooterboolfalseApply the fixed-footer class.
ColorModeTogglebooltrueShow the light/dark/auto color-mode dropdown in the topbar.
DefaultColorModestringautoInitial color mode before any persisted preference: light/dark/auto.
CommandPalettebooltrueShow the ⌘K command palette trigger in the topbar.
FooterTextstringAdminLTE.ioFooter copyright / right-hand text.
MenuIList<MenuItem>emptyThe sidebar menu tree (see the Menu page).

A real appsettings.json example

{
  "AdminLte": {
    "BrandText": "AdminLTE 4",
    "BrandUrl": "/",
    "LogoImage": "https://cdn.jsdelivr.net/npm/admin-lte@4.0.2/dist/assets/img/AdminLTELogo.png",
    "SidebarTheme": "dark",
    "DefaultColorMode": "auto",
    "ColorModeToggle": true,
    "CommandPalette": true,
    "FooterText": "AdminLTE.io",
    "Menu": [
      { "Header": "MAIN NAVIGATION" },
      { "Text": "Dashboard", "Url": "/", "Icon": "bi bi-speedometer" },
      {
        "Text": "Widgets", "Icon": "bi bi-grid-1x2",
        "Children": [
          { "Text": "Small Boxes", "Url": "/widgets/small-boxes", "Icon": "bi bi-circle" },
          { "Text": "Cards", "Url": "/widgets/cards", "Icon": "bi bi-circle" }
        ]
      },
      { "Text": "Admin", "Url": "/admin", "Icon": "bi bi-shield-lock", "Policy": "RequireAdmin" }
    ]
  }
}

Configuring in code

If you would rather not use JSON, the action overload of AddAdminLte configures the same options in C#:

builder.Services.AddAdminLte(options =>
{
    options.BrandText = "My App";
    options.SidebarTheme = "light";
    options.DefaultColorMode = "auto";
    options.Menu = new List<MenuItem>
    {
        new() { Header = "MAIN NAVIGATION" },
        new() { Text = "Dashboard", Url = "/", Icon = "bi bi-speedometer" },
    };
});

Options are validated on startup (ValidateOnStart), and the menu is read through IOptionsMonitor<AdminLteOptions>, so edits to appsettings.json are picked up without a restart.

How the options flow through the shell

DashboardLayout injects IOptions<AdminLteOptions> and reads CommandPalette, ColorModeToggle, SidebarTheme, BrandText, BrandUrl, LogoImage, FooterText and Menu to render the topbar, sidebar and footer. You can still override any individual region with the layout's slot parameters when you need something custom.


AdminLTE 4 · ASP.NET port Edit on GitHub