swiftlys2/docs/api/ai/
API Reference › Menu.Components

TitleComponent

Class
Namespace: SwiftlyS2.Shared.Menu.Components · Assembly: SwiftlyS2.CS2.dll
public class TitleComponent : TextComponent, IMenuComponent

A non-interactive line identifying the menu, drawn at the top of the header.

Semantically distinct from TextComponent so a menu's title is a real component rather than a builder side effect, even though it renders through the same node types.

View source

Constructors

TitleComponent(string, string?)

Creates a title.

public TitleComponent(string title = "", string? id = null)
Parameters
  • titlestringoptionalThe title text.
  • idstring?optionalA stable id, or null to generate one.

Properties

IsFocusable

Whether the selection can land on this component.

public override bool IsFocusable { get; }
Property Value

A label can hold the selection like any other body entry, so a menu scrolls past it rather than skipping over it, but it never overrides MenuActionContext) so activating it is always a no-op.