lotusui
A Go design system for desktop and mobile — one codebase, native apps. Web when you want it.
GitHub

Popover

Arbitrary content on the floating layer, anchored to a trigger.

The general form of Select's dropdown, on the same portal primitive: the caller owns Open, the panel floats 4dp below the anchor, and pressing anywhere else or Escape closes it.

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 popover

Usage

open demo ↗

Alignments

Align positions the panel's edge against the anchor: PopoverCenter (default, shadcn), PopoverStart, PopoverEnd.

open demo ↗

API

OptionTypeDescription
OpenboolCaller-owned; toggled from the trigger's click.
Widthunit.DpMax panel width; zero matches the anchor. Non-zero: hug content up to Width.
AlignPopoverAlignPopoverCenter (default, shadcn), PopoverStart, PopoverEnd against the anchor.

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.