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

ButtonGroup

Attached controls: one shared border, square inner corners.

Children sit edge-to-edge — neighbors overlap by 1dp so their borders collapse to a single line, inner corners render square, and only the group's outer corners keep the radius. Slots hold buttons, a separator seam, or any widget (an input) with flex weight.

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 button-group

Usage

open demo ↗

Orientation

Vertical stacks the group top-to-bottom.

open demo ↗

Sizes

Size the items — the group follows.

open demo ↗

Separator

ButtonGroupSeparator() renders the hairline seam between attached neighbors.

open demo ↗

Split

The split button: a main action and an attached icon action across a seam.

open demo ↗

With input

A flexed Widget slot carries any control — the search-and-go row.

open demo ↗

API

OptionTypeDescription
ButtonGroupProps.VerticalboolStack the group top-to-bottom.
ButtonGroupItem.Btn / Label / PropsA button slot; the group sets Props.Attached.
ButtonGroupItem.SeparatorboolThe hairline seam (ButtonGroupSeparator()).
ButtonGroupItem.Widget / Flexlayout.Widget / float32Arbitrary content; flexed weight.
ButtonProps.AttachedAttachedEdgesSquares the corners on attached sides — set by the group.

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.