🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

DropDownPackage

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

DropDownPackage

My blazor dropdown component

1.0.2
NuGet
Version published
Maintainers
1
Created
Source

DropDownPackage

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

  • 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_closed

Dropdown open

Dropdown_open

Dropdown filtered

Dropdown_filtered

Dropdown selected item

Dropdown_selected_item

Keywords

Blazor

FAQs

Package last updated on 01 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts