DropDownPackage 1.0.2

dotnet add package DropDownPackage --version 1.0.2
                    
NuGet\Install-Package DropDownPackage -Version 1.0.2
                    
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="DropDownPackage" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DropDownPackage" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="DropDownPackage" />
                    
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 DropDownPackage --version 1.0.2
                    
#r "nuget: DropDownPackage, 1.0.2"
                    
#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.
#addin nuget:?package=DropDownPackage&version=1.0.2
                    
Install DropDownPackage as a Cake Addin
#tool nuget:?package=DropDownPackage&version=1.0.2
                    
Install DropDownPackage as a Cake Tool

A lightweight, customizable DropDown component built with Blazor. Easily select options from a dropdown with support for search, custom templates, and more.

✨ Features

✅ Select options from a dropdown

🔍 Optional search/filter support

🎨 Customizable item templates

🧩 Supports binding to complex data types

🚀 Getting Started

Installation

  1. Add the following to your _Imports.razor file:
    @using DropDownPackage.Components
    

Usage

See the project DropDownPackage for more examples of how to use the component

MultiSelect dropdown

<DropDown T="DummyDataDto"
	Items="DummyData"
	DisplayProperty="FullName"
	IdentifierProperty="Id"
	ValueChanged="OnSelectedItemChanged"
	CanSearch="true"
	SearchPlaceHolder="Search..."
	CustomStyle=""
	Width="35%" />
When your Item looks like this:
public class DummyDataDto
{
	public int Id { get; set; }
	public string Name { get; set; } = string.Empty;
	public string Surname { get; set; } = string.Empty;
	public string FullName
	{
		get
		{
			return $"{Name} {Surname}";
		}
	}
}
And your OnSelectedItemsChanged method looks like this:
public void OnSelectedItemChanged(DummyDataDto item)
{
	try
	{
		selectedItem = item;
	}
	catch (Exception ex)
	{
		Console.WriteLine(ex.Message);
	}
}

Screenshots

Dropdown_closed

Dropdown_open

Dropdown_filtered

Dropdown_selected_item

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 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. 
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.2 123 4/1/2025