AstrolUI AstrolUI
Yellow Orange Red Green Blue Purple Custom color
Light mode
MenuAdmin

Video tutorial

1. Demo AstrolMenuAdmin

Note
The component is intended to be used within the template (AstrolLayoutMenu), but it can also be encapsulated within any component. It's important to note that it takes up 100% of the width within its parent component.
@using Astrol.Entities.Basic.UI
@using Astrol.Component.Basic.Menu
<div style="float:left;width:300px;background:var(--background-menu);position:relative;max-height:400px;">
   <AstrolMenuAdmin MenuList="optionsMenu" />
</div>
@code {
   List<MenuItem> optionsMenu = new List<MenuItem> {
       new MenuItem {
           URL = "/",
           Icon = "astrol-home",
           Name = "Home",
       },
       new MenuItem {
           Icon = "astrol-th-outline",
           Name = "Web sites",
           StatusSubMenu = true,
           SubMenus = new List<MenuItem> {
               new MenuItem {
                   URL = "https://astrolui.com",
                   Icon = "astrol-heart-filled",
                   Name = "AstrolUi",
               },
               new MenuItem {
                   URL = "https://jazui.com",
                   Icon = "astrol-star-filled",
                   Name = "Jazui",
                   IsNew = true
               },
           }
       }
   };
}

Supported parameters

  • MenuList (List<MenuItem>), menu items (one submenu level is supported).
  • SelectByUrl (bool), selects the item whose URL matches the current page (or the longest prefix: /clients/5 selects /clients) and opens its submenu; also when navigating with links or the browser buttons (default true).
  • MenuItem properties (@using Astrol.Entities.Basic.UI):
    • Name (string), item text, rendered as plain text. It may repeat (e.g. several «Installation»): the active item is identified by its URL.
    • NameIsHtml (bool), renders Name as HTML (default false); use it only with trusted content.
    • Icon (string), icon css class (optional).
    • URL (string), navigation address. With a URL the item is a link; without one it is a button that only expands its submenu.
    • Active (bool), selected item (default false); with SelectByUrl it is computed from the URL.
    • Section (string), group title (e.g. «General», «Packages»): the item that sets it starts a new group and the following ones without Section belong to it.
    • IsNew (bool), highlights the option with a new label (default false).
    • StatusSubMenu (bool), submenu expanded (default false).
    • SubMenus (List<MenuItem>), submenu items.
    • Roles (string), comma-separated roles for which a submenu item is shown (uses AuthorizeView, authentication must be configured). The parent item is shown if the user has any of its children's roles; if any child has no roles, the parent is always shown. Roles on a top-level item are ignored.
Markdown for AI © 2026 AstrolUI v10.0.13