A comprehensive collection of high-quality Blazor components
$ dotnet add package LoreSoft.Blazor.ControlsA comprehensive collection of high-quality Blazor components designed to enhance your web applications with rich user interface elements. This library provides everything from data visualization components to form controls, loading indicators, and utility components.
The LoreSoft Blazor Controls project contains a collection of production-ready Blazor user controls that are easy to use, highly customizable, and built with performance in mind. Whether you need data grids, form inputs, loading indicators, or notification systems, this library has you covered.
The LoreSoft.Blazor.Controls library is available on nuget.org via package name LoreSoft.Blazor.Controls.
To install LoreSoft.Blazor.Controls, run the following command in the Package Manager Console
Install-Package LoreSoft.Blazor.Controls
To use, you need to include the following CSS and JS files in your index.html (Blazor WebAssembly) or _Host.cshtml (Blazor Server).
In the head tag add the following CSS.
<link rel="stylesheet" href="_content/LoreSoft.Blazor.Controls/BlazorControls.css" />
This library provides a comprehensive set of Blazor components organized into the following categories:
A powerful data grid component for displaying tabular data with advanced features:
A flexible list component for displaying data items using custom templates:
A comprehensive date and time input component supporting multiple data types:
DateTime, DateTimeOffset, DateOnly, TimeOnly, and TimeSpanAn image upload component with preview functionality:
A modern toggle switch component for boolean values:
bool and bool? typesAn advanced autocomplete/search component with rich features:
A button component that shows loading state during operations:
A utility component for conditional rendering:
@if statements in templatesA loading overlay component for indicating progress:
An animated progress bar with service-based state management:
A skeleton placeholder component for loading states:
A comprehensive toast notification system:
A visual query builder for complex filtering:
A component for displaying Gravatar images:
A component for asynchronously loading and displaying values:
A component for displaying dates and times in the user's local timezone:
DateTime and DateTimeOffsetA simple repeater component for rendering collections:
@foreach loopsThe Typeahead component provides powerful search and selection capabilities:
State selection dropdown. Bind to Value property for single selection mode.
<Typeahead SearchMethod="@SearchState"
Items="Data.StateList"
@bind-Value="@SelectedState"
Placeholder="State">
<SelectedTemplate Context="state">
@state.Name
</SelectedTemplate>
<ResultTemplate Context="state">
@state.Name
</ResultTemplate>
</Typeahead>
@code {
public StateLocation SelectedState { get; set; }
public Task<IEnumerable<StateLocation>> SearchState(string searchText)
{
var result = Data.StateList
.Where(x => x.Name.ToLower().Contains(searchText.ToLower()))
.ToList();
return Task.FromResult<IEnumerable<StateLocation>>(result);
}
}
When you want to be able to select multiple results. Bind to the Values property. The target property must be type IList<T>.
<Typeahead SearchMethod="@SearchPeople"
Items="Data.PersonList"
@bind-Values="@SelectedPeople"
Placeholder="Owners">
<SelectedTemplate Context="person">
@person.FullName
</SelectedTemplate>
<ResultTemplate Context="person">
@person.FullName
</ResultTemplate>
</Typeahead>
@code {
public IList<Person> SelectedPeople;
public Task<IEnumerable<Person>> SearchPeople(string searchText)
{
var result = Data.PersonList
.Where(x => x.FullName.ToLower().Contains(searchText.ToLower()))
.ToList();
return Task.FromResult<IEnumerable<Person>>(result);
}
}
Use Octokit to search for a GitHub repository.
<Typeahead SearchMethod="@SearchGithub"
@bind-Value="@SelectedRepository"
Placeholder="Repository"
MinimumLength="3">
<SelectedTemplate Context="repo">
@repo.FullName
</SelectedTemplate>
<ResultTemplate Context="repo">
<div class="github-repository clearfix">
<div class="github-avatar"><img src="@repo.Owner.AvatarUrl"></div>
<div class="github-meta">
<div class="github-title">@repo.FullName</div>
<div class="github-description">@repo.Description</div>
<div class="github-statistics">
<div class="github-forks"><i class="fa fa-flash"></i> @repo.ForksCount Forks</div>
<div class="github-stargazers"><i class="fa fa-star"></i> @repo.StargazersCount Stars</div>
<div class="github-watchers"><i class="fa fa-eye"></i> @repo.SubscribersCount Watchers</div>
</div>
</div>
</div>
</ResultTemplate>
</Typeahead>
@inject IGitHubClient GitHubClient;
@code {
public Repository SelectedRepository { get; set; }
public async Task<IEnumerable<Repository>> SearchGithub(string searchText)
{
var request = new SearchRepositoriesRequest(searchText);
var result = await GitHubClient.Search.SearchRepo(request);
return result.Items;
}
}