Installation & Setup
Package Installation
BlazorX Components is available as a NuGet package. You can install it using one of the following methods:
Using .NET CLI
dotnet add package BlazorX.ComponentsUsing Package Manager Console
Install-Package BlazorX.ComponentsUsing Visual Studio
- Right-click on your project in Solution Explorer
- Select "Manage NuGet Packages..."
- Search for "BlazorX.Components"
- Click "Install"
📦 Package Information:
View on NuGet.org
View on NuGet.org
Configuration
1. Add Using Statement
Add the following to your _Imports.razor file:
@using BlazorX.Components2. Add Services (if needed)
In your Program.cs or Startup.cs, add the required services:
builder.Services.AddBlazorXComponents();3. Include Styles (Optional)
If the component includes default styles, add this to your App.razor or index.html/_Host.cshtml:
<link href="_content/BlazorX.Components/styles.css" rel="stylesheet" />Quick Start
Once installed, you can start using the BlazorXSelect component:
<BlazorXSelect TItem="string"
TValue="string"
Items="@items"
@bind-Value="@selectedValue"
TextField="@(x => x)"
ValueField="@(x => x)"
Placeholder="Select an option" />
@code {
private List<string> items = new() { "Option 1", "Option 2", "Option 3" };
private string selectedValue;
}Requirements
- .NET 6.0 or higher
- Blazor Server or Blazor WebAssembly
Next Steps
Check out the following resources to learn more: