AndrewK.Umbraco.Dropdown
17.0.4
dotnet add package AndrewK.Umbraco.Dropdown --version 17.0.4
NuGet\Install-Package AndrewK.Umbraco.Dropdown -Version 17.0.4
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="AndrewK.Umbraco.Dropdown" Version="17.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AndrewK.Umbraco.Dropdown" Version="17.0.4" />
<PackageReference Include="AndrewK.Umbraco.Dropdown" />
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 AndrewK.Umbraco.Dropdown --version 17.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AndrewK.Umbraco.Dropdown, 17.0.4"
#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 AndrewK.Umbraco.Dropdown@17.0.4
#: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=AndrewK.Umbraco.Dropdown&version=17.0.4
#tool nuget:?package=AndrewK.Umbraco.Dropdown&version=17.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AndrewK.Umbraco.Dropdown
AndrewK.Umbraco.Dropdown is a custom property editor for Umbraco 17 that enhances the default dropdown functionality with advanced features and improved user experience. It provides a flexible and intuitive dropdown interface for selecting single or multiple values within the Umbraco backoffice.
Features
- Single or Multiple Selection: Configure as a single-select dropdown or a multi-select list.
- Default Value Support: Set default values for new content items.
- Legacy Value Handling: Gracefully handles values that no longer exist in the options list.
- Validation Support: Provides visual feedback for invalid selections.
- Responsive UI: Modern interface built with Lit elements.
- Type-Safe Access: Returns string for single selection or IEnumerable<string> for multiple selections.
- Umbraco 17 Compatible: Built specifically for Umbraco 17 using modern web standards.
Installation
You can install the package via NuGet:
dotnet add package AndrewK.Umbraco.Dropdown
Usage
Creating a Dropdown Property
- Create a new Data Type in the Umbraco backoffice
- Select "AndrewK Dropdown" as the property editor
- Configure options and selection mode
- Add the data type to your document type
Configuration Options
- Items: Define the dropdown options as key-value pairs
- Multiple: Toggle between single and multiple selection modes
- Default: Set a default value for new content items
Accessing Dropdown Data in Controllers/Services/Templates
public class MyController : Controller
{
public IActionResult Index()
{
var content = // ... get your content
// For single selection
var singleValue = content.Value<string>("mySingleDropdownProperty");
// For multiple selection
var multipleValues = content.Value<ICollection<string>>("myMultiDropdownProperty");
foreach (var value in multipleValues ?? Enumerable.Empty<string>())
{
// Process your values
}
return View();
}
}
Example Of Setting Dropdown Data in Controllers/Services
public class MyController : Controller
{
public IActionResult Index()
{
var collection = // ... your collection, serializable to a list of strings
// set serialized object
content.SetValue(PropertyAlias, JsonConvert.SerializeObject(collection));
return View();
}
}
UI
Property

DataType editor

| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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.
-
net10.0
- AndrewK.Umbraco.Dictionary (>= 17.0.5)
- Microsoft.AspNetCore.Components.Web (>= 10.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
17.0.4:
- Dependencies updated (Umbraco 17.4.2, AndrewK.Umbraco.Dictionary 17.0.5, TypeScript 6.0.3, Vite 8.0.14).