LeptonX Blazor UI
LeptonX theme is implemented and ready to use with ABP Commercial. No custom implementation is needed for Blazor Server & WebAssembly.
Installation
Add Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXTheme package to your Blazor WASM application.
Remove old theme from DependsOn attribute in your module class and add AbpAspNetCoreComponentsWebAssemblyLeptonXThemeModule type to DependsOn attribute.
- Change startup
App
component with the LeptonX one.Add following using declaration and remove your old theme using declaration.
Make sure
App
component in following block isVolo.Abp.AspNetCore.Components.Web.LeptonXTheme.Components.App
- If you can't remove or not sure which one is the old theme's using statements, you can use full name of that class:
Customization
Themes
You can set default theme or add or remove themes via using LeptonXThemeOptions.
DefaultStyle
: Defines deffault fallback theme. Default value is DimStyles
: Defines selectable themes from UI.red.css
andbootstrap-red.css
have to be added underwwwroot/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/side-menu/css/
folder for switching to your custom theme properly when selected.
LeptonXThemeBlazorOptions
Layout options of Blazor UI can be manageable via using LeptonXThemeMvcOptions.
Layout
: Layout of main application. Default value isLeptonXMvcLayouts.SideMenu
MobileMenuSelector
: Defines items to be displayed at mobile menu. Default value is first 2 items from main menu items.
Layouts
LeptonX offers two ready-made layouts for your web application. One of them is placed with the menu items on the top and the other with the menu items on the sides.
Top Menu Layout
Side Menu Layout
You can override layouts by following the steps below:
- Create a razor page, like
MySideMenuLayout.razor
, in your blazor application as shown below:
- If you prefer to use code-behind file for the C# code of your component, create a razor component, like
MySideMenuLayout.razor.cs
, in your blazor application as shown below: see below:
Don't forget to remove same attributes from the razor page!
Common Components
Commonly used components in all layouts.
Breadcrumb
- Create a razor page, like
MyBreadcrumbs.razor
, in your blazor application as shown below:
- If you prefer to use code-behind file for the C# code of your component, create a razor component, like
MyBreadcrumbs.razor.cs
, in your blazor application as shown below:
Content Toolbar
- Create a razor page, like
MyContentToolbar.razor
, in your blazor application as shown below:
- If you prefer to use code-behind file for the C# code of your component, create a razor component, like
MyContentToolbar.razor.cs
, in your blazor application as shown below:
General Settings
- Create a razor page, like
MyGeneralSettings.razor
, in your blazor application as shown below:
- If you prefer to use code-behind file for the C# code of your component, create a razor component, like
MyGeneralSettings.razor.cs
, in your blazor application as shown below:
Mobile General Settings
- Create a razor page, like
MyMobileGeneralSettings.razor
, in your blazor application as shown below:
- If you prefer to use code-behind file for the C# code of your component, create a razor component, like
MyMobileGeneralSettings.razor.cs
, in your blazor application as shown below:
Side Menu Components
Components used in the side menu layout.
Main Menu
- Create a razor page, like
MyMainMenu.razor
, in your blazor application as shown below:
- If you prefer to use code-behind file for the C# code of your component, create a razor component, like
MyMainMenu.razor.cs
, in your blazor application as shown below:
Main Menu Item
- Create a razor page, like
MyMainMenuItem.razor
, in your blazor application as shown below:
- If you prefer to use code-behind file for the C# code of your component, create a razor component, like
MyMainMenuItem.razor.cs
, in your blazor application as shown below:
Mobile Navbar
- Create a razor page, like
MyMobileNavbar.razor
, in your blazor application as shown below:
- If you prefer to use code-behind file for the C# code of your component, create a razor component, like
MyMobileNavbar.razor.cs
, in your blazor application as shown below:
Main Header
- Create a razor page, like
MyMainHeader.razor
, in your blazor application as shown below:
- If you prefer to use code-behind file for the C# code of your component, create a razor component, like
MyMainHeader.razor.cs
, in your blazor application as shown below:
Main Header Branding
- Create a razor page, like
MyMainHeaderBranding.razor
, in your blazor application as shown below:
- If you prefer to use code-behind file for the C# code of your component, create a razor component, like
MyMainHeaderBranding.razor.cs
, in your blazor application as shown below:
Main Header Toolbar
- Create a razor page, like
MyMainHeaderToolbar.razor
, in your blazor application as shown below:
- If you prefer to use code-behind file for the C# code of your component, create a razor component, like
MyMainHeaderToolbar.razor.cs
, in your blazor application as shown below:
Top Menu Components
Components used in the top menu layout.
Main Menu
- Create a razor page, like
MyMainMenu.razor
, in your blazor application as shown below:
- If you prefer to use code-behind file for the C# code of your component, create a razor component, like
MyMainMenu.razor.cs
, in your blazor application as shown below:
Main Menu Item
- Create a razor page, like
MyMainMenuItem.razor
, in your blazor application as shown below:
- If you prefer to use code-behind file for the C# code of your component, create a razor component, like
MyMainMenuItem.razor.cs
, in your blazor application as shown below:
Mobile Navbar
- Create a razor page, like
MyMobileNavbar.razor
, in your blazor application as shown below:
- If you prefer to use code-behind file for the C# code of your component, create a razor component, like
MyMobileNavbar.razor.cs
, in your blazor application as shown below:
Main Header
- Create a razor page, like
MyMainHeader.razor
, in your blazor application as shown below:
- If you prefer to use code-behind file for the C# code of your component, create a razor component, like
MyMainHeader.razor.cs
, in your blazor application as shown below:
Main Header Branding
- Create a razor page, like
MyMainHeaderBranding.razor
, in your blazor application as shown below:
- If you prefer to use code-behind file for the C# code of your component, create a razor component, like
MyMainHeaderBranding.razor.cs
, in your blazor application as shown below:
Main Header Toolbar
- Create a razor page, like
MyMainHeaderToolbar.razor
, in your blazor application as shown below:
- If you prefer to use code-behind file for the C# code of your component, create a razor component, like
MyMainHeaderToolbar.razor.cs
, in your blazor application as shown below: