OBS.Blazor.Components
1.0.2.1
dotnet add package OBS.Blazor.Components --version 1.0.2.1
NuGet\Install-Package OBS.Blazor.Components -Version 1.0.2.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OBS.Blazor.Components" Version="1.0.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OBS.Blazor.Components" Version="1.0.2.1" />
<PackageReference Include="OBS.Blazor.Components" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OBS.Blazor.Components --version 1.0.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: OBS.Blazor.Components, 1.0.2.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OBS.Blazor.Components@1.0.2.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OBS.Blazor.Components&version=1.0.2.1
#tool nuget:?package=OBS.Blazor.Components&version=1.0.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
OBS.Components
Reusable Blazor component library containing flexible UI widgets like <OBSSelect>
, a dropdown component with full templating, FontAwesome support, and more.
✅ Features
- Custom dropdown with templated items
- FontAwesome / icon support
- Supports
@bind-Value
andValueChanged
- Optional “Clear” option
- Keyboard-friendly (Enter key)
- Works well with Bootstrap 5
🚀 Getting Started
1. Install the NuGet package
dotnet add package OBS.Components
2. Register namespace
In your Blazor app's _Imports.razor
or component:
@using OBS.Components
🧪 Usage
<OBSDropDownSelect TItem="GridConfig"
TValue="GridConfig"
Data="@SavedConfigs"
@bind-Value="SelectedConfig"
TextSelector="cfg => cfg.Name"
Label="Select Layout"
AllowClear="true"
ItemTemplate="cfg => @<span>
@if (cfg.IsGlobalEntry)
{
<i class='fa-solid fa-globe me-1 text-info'></i>
}
@cfg.Name
</span>" />
🔧 Parameters
Parameter | Type | Description |
---|---|---|
Data |
IEnumerable<TItem> |
Source list of items |
Value |
TItem? |
Currently selected item |
ValueChanged |
EventCallback<TItem?> |
Called when selection changes |
@bind-Value |
TItem? |
Two-way binding for selected value |
TextSelector |
Func<TItem, string> |
Converts item to string label |
ItemTemplate |
RenderFragment<TItem> |
Custom rendering for each item |
Label |
string? |
Optional label above dropdown |
Disabled |
bool |
Disables the component |
AllowClear |
bool |
Shows a “Clear” item at top |
📁 Project Structure
OBSSelect.razor
– UI layoutOBSSelect.razor.cs
– logic and behavior- Designed to work with Bootstrap 5 & FontAwesome
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Microsoft.AspNetCore.Components.Web (>= 9.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.