Skip to main content

Choice

Family: Inputs & Forms
Namespace: Tessera.Controls

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

When to use

  • One-of-many selection with a short option list.
  • You want explicit selection state in a compact footprint.

Minimal usage

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

var lane = new Choice
{
    Title = "Lane",
    Items = { "Citrine", "Cobalt", "Ember" }
};

var status = new StatusBar { LeftText = "Select lane" };
lane.SelectionChanged += (_, _) => status.LeftText = $"Lane: {lane.SelectedItem}";

return Screen.Build(window =>
{
    window.Footer(1, status);
    window.Body(body => body.Center(lane, width: 36, height: 7));
});

Common pitfalls

  • Prefer ComboBox when users need to type and narrow options.
  • Keep option labels stable to avoid confusing selection persistence.

Public properties

PropertyType
BorderBorderStyle
BorderStyleTextTesseraStyle
DisabledStyleTesseraStyle
FocusedBorderStyleTextTesseraStyle
FocusedTitleStyleTesseraStyle
FocusMarkerstring
GlyphsDropdownGlyphSet
HoveredOptionStyleTesseraStyle
HoveredValueStyleTesseraStyle
IsDisabledbool
IsFocusedbool
IsOpenbool
IsReadOnlybool
MaxVisibleItemsint
MutedStyleTesseraStyle
OptionStyleTesseraStyle
PaddingThickness
SelectedOptionStyleTesseraStyle
ShowFocusMarkerbool
Titlestring
TitleStyleTesseraStyle
ValueStyleTesseraStyle

Public events

EventType
SelectionChangedEventHandler<SelectionChangedEventArgs>?