Emergent.Umbraco.TagHelpers
1.0.5
dotnet add package Emergent.Umbraco.TagHelpers --version 1.0.5
NuGet\Install-Package Emergent.Umbraco.TagHelpers -Version 1.0.5
<PackageReference Include="Emergent.Umbraco.TagHelpers" Version="1.0.5" />
<PackageVersion Include="Emergent.Umbraco.TagHelpers" Version="1.0.5" />
<PackageReference Include="Emergent.Umbraco.TagHelpers" />
paket add Emergent.Umbraco.TagHelpers --version 1.0.5
#r "nuget: Emergent.Umbraco.TagHelpers, 1.0.5"
#:package Emergent.Umbraco.TagHelpers@1.0.5
#addin nuget:?package=Emergent.Umbraco.TagHelpers&version=1.0.5
#tool nuget:?package=Emergent.Umbraco.TagHelpers&version=1.0.5
ES Umbraco TagHelpers
A NuGet package providing reusable ASP.NET Core Tag Helpers for Umbraco frontend development. Helpers follow an es-* attribute prefix convention and are designed to reduce boilerplate in Razor views — for example, conditionally rendering elements or applying CSS classes based on model state.
🚀 Getting Started
After installing the package, register the tag helpers in your _ViewImports.cshtml:
@addTagHelper *, Emergent.Umbraco.TagHelpers
📓 Attributes and Examples
es-if — Conditional rendering
Conditionally renders any HTML element based on a boolean expression.
| Attribute | Type | Description |
|---|---|---|
es-if |
bool |
When true the element renders normally. When false the behaviour is controlled by es-if-mode. |
es-if-mode |
HideMode |
Subtree (default) suppresses the element and all its children. Self suppresses the element tag but still renders its children inline. |
HideMode values
| Value | Behaviour |
|---|---|
Subtree |
Removes the element and all its children from the output. |
Self |
Removes the wrapping element tag but keeps the inner content. |
@* Hide the entire element and its children *@
<div es-if="Model.IsLoggedIn">
<p>Welcome back!</p>
</div>
@* Keep the inner content but drop the wrapping tag *@
<div es-if="Model.ShowWrapper" es-if-mode="Self">
<p>This paragraph is always rendered.</p>
</div>
es-class-* — Conditional CSS classes
Conditionally adds one or more CSS classes to any HTML element. Each es-class-{name} attribute adds {name} to the element's class list when its value is true.
| Attribute | Type | Description |
|---|---|---|
es-class-{name} |
bool |
Adds the CSS class {name} when true. Multiple attributes can be combined on a single element. |
@* Add a single conditional class *@
<button es-class-disabled="!Model.CanSubmit">Submit</button>
@* Combine multiple conditional classes *@
<li es-class-active="item.IsActive" es-class-featured="item.IsFeatured">
@item.Title
</li>
| Product | Versions 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. 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. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
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 |
|---|