lotusui the ikaito design language for Gio — desktop, mobile, web
GitHub

DropdownMenu

Labels, items, separators, checkboxes, radio groups — the full menu grammar.

DropdownMenuTrigger opens the floating panel from a trigger button — press anywhere else, Escape, or pick an item to close it (checkbox and radio menus set KeepOpen, because picking is not leaving). DropdownMenu remains the raw panel for inline use. The row family covers plain items, icon items, shortcut hints, toggleable checkbox items, exclusive radio items, group labels and separators; all row STATE lives with the caller. Submenus are on the roadmap; web-specific composition and RTL are "from the web".

Installation

Use the module import (the default), or own the source: lotusui add vendors the component into your app and lotusui update keeps the copy mergeable — see Registry.

Go
go get github.com/ikaito-com/lotusui

# or vendor the source into your app:
go run github.com/ikaito-com/lotusui/cmd/lotusui add dropdown-menu

Usage

The trigger opens the panel; labels head groups, separators divide them, items act.

Go
var menu lotusui.DropdownMenuTrigger

menu.Layout(th, gtx, "Open",
	lotusui.DropdownMenuLabel(th, "My Account"),
	lotusui.DropdownMenuItem(th, &profile, "Profile", false),
	lotusui.DropdownMenuItem(th, &billing, "Billing", false),
	lotusui.DropdownMenuSeparator(th),
	lotusui.DropdownMenuItem(th, &team, "Team", false),
	lotusui.DropdownMenuItem(th, &sub, "Subscription", false),
)

Icons

Go
lotusui.DropdownMenuItemIcon(th, &rename, lotusui.IconEdit, "Rename", false)

Shortcuts

Right-aligned keyboard hints in muted ink — display only; binding the key is yours.

Go
lotusui.DropdownMenuShortcutItem(th, &save, "Save", "⌘S", false)

Checkboxes

Toggleable rows with a check-mark gutter; flip your bool on Clicked.

Go
if chk.Clicked(gtx) { showStatus = !showStatus }
lotusui.DropdownMenuCheckboxItem(th, &chk, "Show status bar", showStatus)
menu.KeepOpen = true // picking is not leaving

Checkboxes with icons

A leading icon between the gutter and the label.

Go
lotusui.DropdownMenuCheckboxItemIcon(th, &mail, lotusui.IconMail, "Email notifications", notifMail)

Radio group with icons

Go
lotusui.DropdownMenuRadioItemIcon(th, &card, lotusui.IconCreditCard, "Credit Card", payment == 0)

Radio group

Exclusive rows with a dot gutter; the group is your int.

Go
lotusui.DropdownMenuRadioItem(th, &top, "Top", position == 0)
lotusui.DropdownMenuRadioItem(th, &bottom, "Bottom", position == 1)

Destructive

danger renders danger ink on a danger-tinted hover — never a saturated fill.

Go
lotusui.DropdownMenuItem(th, &del, "Delete workspace…", true)

Complex

Everything together: label, shortcut item, icon item, separators, a toggle, a destructive exit.

Go
lotusui.DropdownMenu(th,
	lotusui.DropdownMenuLabel(th, "My Account"),
	lotusui.DropdownMenuShortcutItem(th, &profile, "Profile", "⇧⌘P", false),
	lotusui.DropdownMenuItemIcon(th, &settings, lotusui.IconSettings, "Settings", false),
	lotusui.DropdownMenuSeparator(th),
	lotusui.DropdownMenuCheckboxItem(th, &urls, "Show full URLs", showURLs),
	lotusui.DropdownMenuSeparator(th),
	lotusui.DropdownMenuItem(th, &del, "Delete account", true),
)

API

OptionTypeDescription
DropdownMenuTrigger.OpenboolThe panel's state; the trigger toggles it.
DropdownMenuTrigger.KeepOpenboolSuppress close-on-selection — checkbox/radio menus.
DropdownMenuTrigger.Widthunit.DpPanel width; zero means 224dp.
DropdownMenuTrigger.VariantButtonVariantTrigger button style; the zero value renders outline.
DropdownMenuTrigger.AlignPopoverAlignPanel edge against the trigger — PopoverEnd keeps right-edge menus on screen.
DropdownMenuCheckboxItemIcon / RadioItemIconwidgetGutter rows with a leading icon.
DropdownMenuItem(th, btn, label, danger)widgetOne action row; danger = destructive ink.
DropdownMenuItemIcon / ShortcutItemwidgetLeading icon; right-aligned keyboard hint.
DropdownMenuCheckboxItem / RadioItemwidgetCheck/dot gutter; state lives with the caller.
DropdownMenuLabel / SeparatorwidgetGroup heading; hairline divider.
DropdownMenuSub.Item(th, label, items…)widgetThe nested submenu row; side panel on hover.

Every demo on this site is the real Go component compiled to WebAssembly — one gallery app, one bundle, addressed by URL hash.