Table of Contents

Class HtmxErrorFragment

Namespace
Htmx.Components.Models
Assembly
Htmx.Components.dll

Describes a user-safe error fragment that the client runtime can place in an error region.

public sealed record HtmxErrorFragment : IEquatable<HtmxErrorFragment>
Inheritance
HtmxErrorFragment
Implements
Inherited Members
Extension Methods

Constructors

HtmxErrorFragment(string, string, string, string?)

Describes a user-safe error fragment that the client runtime can place in an error region.

public HtmxErrorFragment(string Title, string Message, string Kind = "general", string? ComponentId = null)

Parameters

Title string
Message string
Kind string
ComponentId string

Properties

ComponentId

public string? ComponentId { get; init; }

Property Value

string

Kind

public string Kind { get; init; }

Property Value

string

Message

public string Message { get; init; }

Property Value

string

Title

public string Title { get; init; }

Property Value

string

Methods

ToHtml()

Renders the fragment as HTML with structured attributes for the client runtime.

public string ToHtml()

Returns

string