Tesserae

Option

Description

The Option component represents a single mutually exclusive choice inside a ChoiceGroup. In the public API, the helper method is Choice(...), and the underlying type is ChoiceGroup.Choice.

Use it when you need radio-button style selection where exactly one option should be active within a group.

Usage

Create options with Choice(...) and place them inside ChoiceGroup(...). The group manages shared selection state and exposes the selected option as an observable value.

Methods

  • Disabled(bool value = true) enables or disables the option.
  • Selected() marks the option as selected.
  • SelectedIf(bool shouldSelect) conditionally selects the option.
  • SetText(string text) updates the displayed label.
  • OnSelected(ComponentEventHandler<ChoiceGroup.Choice> onSelected) registers a callback when this option becomes selected.
  • Render() returns the label-wrapped radio element.

Properties

  • Text gets or sets the displayed label.
  • IsEnabled gets or sets whether the option can be interacted with.
  • IsSelected gets or sets the selected state.
  • Text-formatting properties such as Size, Weight, and TextAlign are available on the component.

See also

Referenced by

© 2026 Tesserae. All rights reserved.