Lui.Dropdown
A select control with a trigger and a pop-down list. The open state is controlled, so pass a bool
and an open-change callback (typically a LuiSignal<bool>), plus a caller-owned LuiRef (declare
it as a field) used to anchor the list:
private readonly LuiRef _classAnchor = new();
Lui.Dropdown(
classes, // IReadOnlyList<LuiOption> or string list
selectedClass.Value,
value => selectedClass.Value = value,
classOpen.Value,
open => classOpen.Value = open,
_classAnchor,
"w-64",
placeholder: "Choose a class")The list renders through the overlay layer (Lui.Portal), so it draws above all other content and
is never clipped by a surrounding overflow-hidden/Lui.Scroll
Last updated on