Step 1: Install the Studs.Blazor package from NuGet
To add STUDS to your Blazor project, install theStuds.Blazor
package from NuGet. This package contains the necessary components and styles to get you started.
.NET CLI
Step 2: Import the Namespace
To use STUDS in your Blazor project, add the following line to your_Imports.razor
file:
Step 3: Add the STUDS CSS
How to install @studs/styles
- Package Manager Installation
- CDN
Install
@studs/styles
using your prefered package manager.Order of Imports
Ensure that the @studs/styles is applied before any other styles to avoid conflicts. This will provide base styling for your project. The order should be:@studs/styles
- Any additional app-specific styles.
How to add @studs/styles
to your Blazor Application
In your wwwroot/index.html
file, add the following line to the <head>
section:
Step 4: Include the Studs.Blazor JS
Open the App.razor file of your application. Add this code after the last<script>
tag:
Step 5: Use a STUDS Component
Step 6: Use Dialog, Notification, ContextMenu and Tooltip components
Open the MainLayout.razor file and include:Set the @rendermode attribute to the render mode of your application e.g.
InteractiveServer, InteractiveWebAssembly or InteractiveAuto. Open the
Program.cs file and include: