Skip to main content

Tabs

Family: Navigation & Workflow
Namespace: Tessera.Controls

Use Tabs when this interaction is the best match for your screen workflow.

When to use

  • Users switch between a few stable views in one region.
  • You need quick mode changes without route/context loss.

Minimal usage

csharp.cs
using Tessera.Controls;
using Tessera.Layout;

var tabs = new Tabs();
tabs.SetItems("Workspace", "Inspect", "Actions");
tabs.SetSelectedIndex(0);

var content = new Label { Text = "Workspace view" };
tabs.SelectionChanged += (_, _) => content.Text = $"{tabs.SelectedItem} view";

return Screen.Build(window =>
{
    window.Body(body =>
    {
        body.Row(0.14f, tabs);
        body.Row(0.86f, content);
    });
});

Common pitfalls

  • Keep tab count small; move large navigation trees to SideNavRail.
  • Preserve state per tab where possible to avoid user frustration.

Public properties

PropertyType
FocusedTitleStyleTesseraStyle
FocusMarkerstring
IsFocusedbool
SelectedIndexint
ShowFocusMarkerbool
Titlestring
TitleStyleTesseraStyle

Public events

EventType
SelectionChangedEventHandler<SelectionChangedEventArgs>?