Table of Contents

Class IslandTagHelper

Namespace
Nite.TagHelpers
Assembly
Nite.dll

<island name="Counter" props="Model.Counter" client="visible">fallback</island>: a placeholder the island loader mounts a client component into. Child content is shown until the island loads, which is a good place for a server-rendered approximation.

[HtmlTargetElement("island", Attributes = "name")]
public sealed class IslandTagHelper : TagHelper, ITagHelper, ITagHelperComponent
Inheritance
IslandTagHelper
Implements
Inherited Members

Constructors

IslandTagHelper(INiteAssets)

<island name="Counter" props="Model.Counter" client="visible">fallback</island>: a placeholder the island loader mounts a client component into. Child content is shown until the island loads, which is a good place for a server-rendered approximation.

public IslandTagHelper(INiteAssets assets)

Parameters

assets INiteAssets

Properties

Client

When to load: load (default), idle, visible or media.

public string? Client { get; set; }

Property Value

string

Export

The export to render, when it is not the default export.

public string? Export { get; set; }

Property Value

string

Media

The media query for client="media".

public string? Media { get; set; }

Property Value

string

Name

The island module's path under the islands folder, without extension.

public string Name { get; set; }

Property Value

string

Props

Props for the component, serialized as camelCase JSON.

public object? Props { get; set; }

Property Value

object

Tag

The wrapper element. Defaults to div.

public string Tag { get; set; }

Property Value

string

ViewContext

[ViewContext]
[HtmlAttributeNotBound]
public ViewContext ViewContext { get; set; }

Property Value

ViewContext

Methods

ProcessAsync(TagHelperContext, TagHelperOutput)

Asynchronously executes the TagHelper with the given context and output. Contains information associated with the current HTML tag. A stateful HTML element used to generate an HTML tag. A Task that on completion updates the output. By default this calls into Process(TagHelperContext, TagHelperOutput)..
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)

Parameters

context TagHelperContext
output TagHelperOutput

Returns

Task