Class ChatMessageAction
- Namespace
- SharpConsoleUI.Controls
- Assembly
- SharpConsoleUI.dll
A single actionable button attached to a chat message's footer. The host owns what the action does via OnClick; the control renders and dispatches it.
public sealed record ChatMessageAction : IEquatable<ChatMessageAction>
- Inheritance
-
ChatMessageAction
- Implements
- Inherited Members
- Extension Methods
Properties
AfterPress
For non-toggle actions: what happens to the actions row after a press.
public ChatActionAfterPress AfterPress { get; init; }
Property Value
Enabled
Whether the button is enabled.
public bool Enabled { get; init; }
Property Value
Group
Optional grouping key; a separator is drawn between adjacent groups.
public string? Group { get; init; }
Property Value
Icon
Optional leading glyph (e.g. a narrow icon). Prepended to the label.
public string? Icon { get; init; }
Property Value
Id
Stable identifier — used for state updates, toggle restore, and removal.
public required string Id { get; init; }
Property Value
IsPressed
For Toggle: the initial pressed state.
public bool IsPressed { get; init; }
Property Value
Label
Button text (markup allowed).
public required string Label { get; init; }
Property Value
OnClick
Synchronous click handler. Receives a context to set status / hide actions / toggle.
public Action<ChatActionContext>? OnClick { get; init; }
Property Value
OnClickAsync
Asynchronous click handler (used instead of / in addition to OnClick).
public Func<ChatActionContext, Task>? OnClickAsync { get; init; }
Property Value
Variant
Visual variant. Toggle makes it a stateful on/off button.
public ChatActionVariant Variant { get; init; }