ComboBox 1.0.14

There is a newer version of this package available.
See the version list below for details.
dotnet add package ComboBox --version 1.0.14
                    
NuGet\Install-Package ComboBox -Version 1.0.14
                    
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="ComboBox" Version="1.0.14" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ComboBox" Version="1.0.14" />
                    
Directory.Packages.props
<PackageReference Include="ComboBox" />
                    
Project file
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 ComboBox --version 1.0.14
                    
#r "nuget: ComboBox, 1.0.14"
                    
#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 ComboBox@1.0.14
                    
#: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=ComboBox&version=1.0.14
                    
Install as a Cake Addin
#tool nuget:?package=ComboBox&version=1.0.14
                    
Install as a Cake Tool

ComboBox for Blazor

A reusable Blazor WebAssembly / Server component: a virtualized, searchable Combobox (Autocomplete Select) designed for large datasets. This is a pure C# and Razor component without external UI dependencies.

✔️ Purpose

Create a modern dropdown input for Blazor apps that supports:

  • Search box inside the dropdown
  • Virtualized infinite scrolling
  • Static in-memory lists or remote server-side APIs
  • Infinite paging with load-more on scroll
  • Customizable item templates
  • Optional selected-item checkmark
  • Customizable "no results" message with access to the search term
  • Closes automatically when clicking outside

✅ Use Cases

  • Selecting from thousands of items
  • API-driven search
  • Autocomplete UIs

🚀 Installation

Via NuGet

dotnet add package ComboBox --version [latest]

Or search for ComboBox in NuGet Package Manager.

As a Local Project

  1. Clone this repository:
    git clone https://github.com/pennan88/ComboBox.git
    

Add the project reference to your Blazor solution.

@using ComboBox.Components
<script src="_content/Combobox/combobox.js"></script>

🛠️ Usage

Static List Example

<ComboBox TValue="string"
          Items="myList"
          @bind-Value="selected"
          Placeholder="Choose an item..." />
@code {
    string selected;
    List<string> myList = new() { "Apple", "Banana", "Cherry", ... };
}

API-Driven Example

<ComboBox TValue="Product"
          ItemsProvider="SearchProductsAsync"
          ItemTemplate="@(product => @<div>@product.Name (@product.Id)</div>)"
          @bind-Value="selectedProduct" />
@code {
    Product selectedProduct;

    async Task<IEnumerable<Product>> SearchProductsAsync(string searchTerm, int skip, int take)
    {
        // Fetch from API or database
    }
}

Customizing Templates

<ComboBox TValue="User"
          Items="users">

  <ItemTemplate Context="Item">
    <p>@item.Name</p>
  </ItemTemplate>

  <NoResultsTemplate>
    <p>Custom no result</p>
  </NoResultsTemplate>
</ComboBox>

🎨 Styling Guidance

  • Uses semantic HTML and CSS classes.
  • Override or extend styles with your own CSS:
    .combobox-dropdown {
      background: #f9f9f9;
    }
    .combobox-item.selected {
      font-weight: bold;
    }
    

📋 Features List

  • Searchable dropdown
  • Virtualized infinite scrolling
  • Static or server data sources
  • Customizable item and no-results templates
  • Selected-item checkmark

🏷️ License

MIT © pennan88

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.25 137 8/4/2025
1.0.24 138 8/4/2025
1.0.23 137 8/4/2025
1.0.22 122 8/4/2025
1.0.21 123 8/4/2025
1.0.20 90 7/28/2025
1.0.19 86 7/28/2025
1.0.18 69 7/18/2025
1.0.17 62 7/18/2025
1.0.16 69 7/18/2025
1.0.15 108 7/17/2025
1.0.14 107 7/17/2025
1.0.13 106 7/17/2025
1.0.12 110 7/17/2025
1.0.11 113 7/17/2025
1.0.10 117 7/16/2025
1.0.9 114 7/16/2025