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.Components

Using Package Manager Console

Install-Package BlazorX.Components

Using Visual Studio

  1. Right-click on your project in Solution Explorer
  2. Select "Manage NuGet Packages..."
  3. Search for "BlazorX.Components"
  4. Click "Install"
📦 Package Information:
View on NuGet.org

Configuration

1. Add Using Statement

Add the following to your _Imports.razor file:

@using BlazorX.Components

2. 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: