lotusui
A Go design system for desktop and mobile — one codebase, native apps. Web when you want it.
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.

open demo ↗

Icons

open demo ↗

Shortcuts

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

open demo ↗

Checkboxes

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

open demo ↗

Checkboxes with icons

A leading icon between the gutter and the label.

open demo ↗

Radio group with icons

open demo ↗

Radio group

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

open demo ↗

Destructive

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

open demo ↗

Complex

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

open demo ↗

API

OptionTypeDescription
DropdownMenuTrigger.OpenboolThe panel's state; the trigger toggles it.
DropdownMenuTrigger.KeepOpenboolSuppress close-on-selection — checkbox/radio menus.
DropdownMenuTrigger.Widthunit.DpMax panel width; zero means min 224dp and grow with content.
DropdownMenuTrigger.VariantButtonVariantTrigger button style; the zero value renders outline.
DropdownMenuTrigger.IconstringOptional icon; empty label + Icon = icon-only (Breadcrumb …).
DropdownMenuTrigger.SizeSizeShared size preset for the trigger button.
DropdownMenuTrigger.AlignPopoverAlignPanel edge against the trigger — zero is PopoverCenter; 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.

lotusui is a Go design system for native desktop and mobile — and the web when you want it. Docs demos are the real components (WebAssembly) — one gallery app, each Preview an iframe addressed by URL hash.