Emergent.Umbraco.TagHelpers 1.0.5

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Emergent.Umbraco.TagHelpers --version 1.0.5
                    
NuGet\Install-Package Emergent.Umbraco.TagHelpers -Version 1.0.5
                    
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="Emergent.Umbraco.TagHelpers" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Emergent.Umbraco.TagHelpers" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="Emergent.Umbraco.TagHelpers" />
                    
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 Emergent.Umbraco.TagHelpers --version 1.0.5
                    
#r "nuget: Emergent.Umbraco.TagHelpers, 1.0.5"
                    
#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 Emergent.Umbraco.TagHelpers@1.0.5
                    
#: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=Emergent.Umbraco.TagHelpers&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=Emergent.Umbraco.TagHelpers&version=1.0.5
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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