UmbNumericDropdown 16.0.1
dotnet add package UmbNumericDropdown --version 16.0.1
NuGet\Install-Package UmbNumericDropdown -Version 16.0.1
<PackageReference Include="UmbNumericDropdown" Version="16.0.1" />
<PackageVersion Include="UmbNumericDropdown" Version="16.0.1" />
<PackageReference Include="UmbNumericDropdown" />
paket add UmbNumericDropdown --version 16.0.1
#r "nuget: UmbNumericDropdown, 16.0.1"
#:package UmbNumericDropdown@16.0.1
#addin nuget:?package=UmbNumericDropdown&version=16.0.1
#tool nuget:?package=UmbNumericDropdown&version=16.0.1
UmbNumericDropdown
This package was designed with a particular use case in mind - make it more comfortable for editors to directly affect frontend styling via the backoffice property editors, without being overloaded with a ton of properties. For example, this editor can be used to easily set up a block with configurable width that can be set in pixels, vw, em, %, or other units, without setting up too many properties.
Since the dropdown values are configurable, it can also be used to e.g. measure weight, distance, height or other units.
Usage in Razor views:
@using UmbNumericDropdown
...
@{
NumericDropdownValue? weight = Model.Value<NumericDropdownValue>("weight");
//IsComplete method returns true if the model contains both values
if (weight != null && weight.IsComplete)
{
<p>Weight: @weight.FormattedValue</p>
// you can also access individual parts - Number is the numeric value, SelectedOption is the dropdown value
<p>Number: @weight.Number</p>
<p>Unit: @weight.SelectedOption</p>
}
}
Configuration/customization
Available configuration options:
- Numeric - Minimum value - integer / decimal from v 16.0.1 onward
- Numeric - Maximum value - integer / decimal from v 16.0.1 onward
- Dropdown - Options (strings)
Tips
In the editor UI, the property editor's dropdown will always auto-select the first option in the dropdown if no specific value is set (as opposed to Umbraco's native dropdown implementation).
Any validation errors, like a number that is out of configured bounds, will not prevent the document from saving/publishing, but the UI editor will be highlighted with a warning and the picked value will not be updated.
| 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. |
-
net9.0
- Umbraco.Cms.Core (>= 16.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.