Table of Contents

Class TwMarker

Namespace
TwBlazor.Components
Assembly
TwBlazor.dll

Represents an inline marker in a conversation: a status line, such as a tool call an assistant made, or a separator between rows with an optional label.

public class TwMarker : TwBlazorComponentBase, IComponent, IHandleEvent, IHandleAfterRender, ITwComponent
Inheritance
TwMarker
Implements
Inherited Members

Remarks

A Status marker shows an icon, a label and an optional detail. Set Status to show a spinner while a step runs and a tick or a cross when it finishes.

Accessibility: a status marker's state is written out for screen readers after its label, so it is never told by the icon or color alone. Set Live to have changes announced as they happen. A Separator marker is a separator, named by its Label. A separator with custom ChildContent needs an AriaLabel to be named.

Constructors

TwMarker()

public TwMarker()

Properties

ChildContent

Gets or sets custom content shown in place of Label.

[Parameter]
public RenderFragment? ChildContent { get; set; }

Property Value

RenderFragment

Color

Gets or sets the color of a status marker's icon or spinner, or of a separator's rule and label.

[Parameter]
public Color? Color { get; set; }

Property Value

Color?

Remarks

If not set, a status marker's icon takes the color of its Status, and a separator is neutral. Use a color to make a separator stand out, for example Danger for "New messages".

Detail

Gets or sets muted text shown after a status marker's label, for example how long a step took.

[Parameter]
public string? Detail { get; set; }

Property Value

string

Icon

Gets or sets the icon a status marker shows.

[Parameter]
public Icon? Icon { get; set; }

Property Value

Icon?

Remarks

If not set, the icon follows Status. A running marker always shows a spinner.

Label

Gets or sets the marker's text, for example "Searched the web" or "Today".

[Parameter]
public string? Label { get; set; }

Property Value

string

Live

Gets or sets whether a status marker is a polite live region, so screen readers announce it when its label or status changes.

[Parameter]
public bool Live { get; set; }

Property Value

bool

Status

Gets or sets the state a status marker reports.

[Parameter]
public MarkerStatus Status { get; set; }

Property Value

MarkerStatus

Variant

Gets or sets what the marker draws.

[Parameter]
public MarkerVariant Variant { get; set; }

Property Value

MarkerVariant

Methods

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder