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").
| Property | Type | Default | Purpose |
|---|---|---|---|
BrandText | string | AdminLTE 4 | Text shown next to the sidebar logo. |
BrandUrl | string | / | URL the brand/logo links to. |
LogoImage | string? | null | Optional logo image URL; a placeholder square renders when null. |
SidebarTheme | string | dark | Sidebar color theme: dark or light. |
SidebarBreakpoint | string | lg | Breakpoint at which the sidebar expands: sm/md/lg/xl/xxl. |
LayoutFixed | bool | true | Apply the layout-fixed class (sticky wrapper, scrollable content). |
FixedHeader | bool | true | Apply the fixed-header class. |
FixedFooter | bool | false | Apply the fixed-footer class. |
ColorModeToggle | bool | true | Show the light/dark/auto color-mode dropdown in the topbar. |
DefaultColorMode | string | auto | Initial color mode before any persisted preference: light/dark/auto. |
CommandPalette | bool | true | Show the ⌘K command palette trigger in the topbar. |
FooterText | string | AdminLTE.io | Footer copyright / right-hand text. |
Menu | IList<MenuItem> | empty | The 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.