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
assetsINiteAssets
Properties
Client
When to load: load (default), idle, visible or media.
public string? Client { get; set; }
Property Value
Export
The export to render, when it is not the default export.
public string? Export { get; set; }
Property Value
Media
The media query for client="media".
public string? Media { get; set; }
Property Value
Name
The island module's path under the islands folder, without extension.
public string Name { get; set; }
Property Value
Props
Props for the component, serialized as camelCase JSON.
public object? Props { get; set; }
Property Value
Tag
The wrapper element. Defaults to div.
public string Tag { get; set; }
Property Value
ViewContext
[ViewContext]
[HtmlAttributeNotBound]
public ViewContext ViewContext { get; set; }
Property Value
Methods
ProcessAsync(TagHelperContext, TagHelperOutput)
context and
output.
output.public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters
contextTagHelperContextoutputTagHelperOutput