a Razor component library for Blazor, inspired by the shadcn/ui components. Explore more about this UI Library @ BLAZOR.ART
Get Free UI Templates built using Sysinfocus simple/ui library.
Use the latest version 0.0.2.1
-
Download the NuGet package
Sysinfocus.AspNetCore.Components
to your project. -
Add
@using Sysinfocus.AspNetCore.Components
to your_import.razor
file. -
Add
builder.Services.AddSysinfocus(jsCssFromCDN: false);
to yourProgram.cs
file. -
Add the following CSS to your project's appropriate file as this depends upon the type of project being used.
/// For .NET 8 <link rel="stylesheet" href="_content/Sysinfocus.AspNetCore.Components/styles.css" /> <link rel="stylesheet" href="_content/Sysinfocus.AspNetCore.Components/Sysinfocus.AspNetCore.Components.bundle.scp.css" /> /// For .NET 9 <link rel="stylesheet" href="@Assets["_content/Sysinfocus.AspNetCore.Components/styles.css"]" /> <link rel="stylesheet" href="@Assets["_content/Sysinfocus.AspNetCore.Components/Sysinfocus.AspNetCore.Components.bundle.scp.css"]" />
-
Add the following initialization code to your
MainLayout.razor
or any layout file which you host the components.@inherits LayoutComponentBase @inject Initialization init <div @onclick="init.HandleMainLayoutClickEvent"> // this is required for some components to close on click outside of its hosting component. @Body </div> @code { protected override async Task OnAfterRenderAsync(bool firstRender) { // This initializes the theme for the components. // Then you can use init.ToggleTheme() to toggle between light and dark modes. if (firstRender) await init.InitializeTheme(); } }
-
For non-interactive Blazor SSR, you need to add the
light
ordark
class tobody
tag manually as it can't initialize automatically. -
For more information, you can download the samples from this repo which has all these steps done and the projects are ready to explore.
-
To see the demo of each component, check out Demo
-
Check out the Release Notes
For more information, you can download the samples from this repo which has all these steps done and the projects are ready to explore. To see the demo of each component, check out Demo
Open an issue on this repo or email to [email protected]