Filter by title
There is a newer version of this document!
Document Options

There are multiple versions of this document. Pick the options that suit you best.

UI:

LeptonX Lite Blazor UI

LeptonX Lite has implementation for the ABP Framework Blazor WebAssembly & Blazor Server. It's a simplified variation of the LeptonX Theme.

If you are looking for a professional, enterprise ready theme, you can check the LeptonX Theme, which is a part of ABP Commercial.

See the Theming document to learn about themes.

Installation

This theme is already installed when you create a new solution using the startup templates. If you are using any other template, you can install this theme by following the steps below:

  • Complete the MVC Razor Pages Installation first. If the solution is tiered/micro-service, complete the MVC steps for all MVC applications such as HttpApi.Host and AuthServer.

  • Add Volo.Abp.AspNetCore.Components.Server.LeptonXLiteTheme package to your Blazor server application with the following command:

    dotnet add package Volo.Abp.AspNetCore.Components.Server.LeptonXLiteTheme --prerelease
    
  • Remove Volo.Abp.AspNetCore.Components.Server.BasicTheme reference from the project since it's not necessary after switching to LeptonX Lite.

  • Remove old theme from the DependsOn attribute in your module class and add the AbpAspNetCoreComponentsServerLeptonXLiteThemeModule type to the DependsOn attribute.

    [DependsOn(
        // Remove BasicTheme module from DependsOn attribute
    -    typeof(AbpAspNetCoreComponentsServerBasicThemeModule),
    
        // Add LeptonX Lite module to DependsOn attribute
    +    typeof(AbpAspNetCoreComponentsServerLeptonXLiteThemeModule)
    )]
    
  • Replace BlazorBasicThemeBundles with BlazorLeptonXLiteThemeBundles in AbpBundlingOptions:

    options.StyleBundles.Configure(
      // Remove following line
    - BlazorBasicThemeBundles.Styles.Global,
      // Add following line instead
    + BlazorLeptonXLiteThemeBundles.Styles.Global,
      bundle =>
      {
          bundle.AddFiles("/blazor-global-styles.css");
          //You can remove the following line if you don't use Blazor CSS isolation for components
          bundle.AddFiles("/MyProjectName.Blazor.styles.css");
      });
    
  • Update _Host.cshtml file. (located under Pages folder by default.)

    • Add following usings to Locate App and BlazorLeptonXLiteThemeBundles classes.

      @using Volo.Abp.AspNetCore.Components.Web.LeptonXLiteTheme.Themes.LeptonXLite
      @using Volo.Abp.AspNetCore.Components.Server.LeptonXLiteTheme.Bundling
      
    • Then replace script & style bundles as following:

      // Remove following line
      - <abp-style-bundle name="@BlazorBasicThemeBundles.Styles.Global" />
      // Add following line instead
      + <abp-style-bundle name="@BlazorLeptonXLiteThemeBundles.Styles.Global" />
      
      // Remove following line
      - <abp-script-bundle name="@BlazorBasicThemeBundles.Scripts.Global" />
      // Add following line instead
      + <abp-script-bundle name="@BlazorLeptonXLiteThemeBundles.Scripts.Global" />
      

Customization

Toolbars

LeptonX Lite includes separeted toolbars for desktop & mobile. You can manage toolbars independently. Toolbar names can be accessible in the LeptonXLiteToolbars class.

  • LeptonXLiteToolbars.Main
  • LeptonXLiteToolbars.MainMobile
public async Task ConfigureToolbarAsync(IToolbarConfigurationContext context)
{
    if (context.Toolbar.Name == LeptonXLiteToolbars.Main)
    {
        context.Toolbar.Items.Add(new ToolbarItem(typeof(MyDesktopComponent)));
    }

    if (context.Toolbar.Name == LeptonXLiteToolbars.MainMobile)
    {
        context.Toolbar.Items.Add(new ToolbarItem(typeof(MyMobileComponent)));
    }

    return Task.CompletedTask;
}

You can visit the Toolbars Documentation for better understanding.

Contributors


Last updated: August 05, 2022 Edit this page on GitHub

Was this page helpful?

Please make a selection.

To help us improve, please share your reason for the negative feedback in the field below.

Please enter a note.

Thank you for your valuable feedback!

Please note that although we cannot respond to feedback, our team will use your comments to improve the experience.

ABP Community Talks
AI-Powered .NET Apps with ABP & Microsoft Agent Framework
18 Dec, 17:00
Online
Watch the Event
ABP Live Webinar
Webinar Calendar Webinar Calendar
Discover
ABP Platform
Register Now
Jan 07
Wednesday,
17:00 UTC
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.