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

Accordion

Stacked disclosures: one panel at a time, animated on the shared clock.

Titles that expand one panel of content at a time (Multiple for independent panels). The reveal grows on the shared clock — content is measured at natural height and clipped, never reflowed mid-flight.

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 accordion

Usage

open demo ↗

Multiple

Multiple lets panels expand independently.

open demo ↗

Disabled item

open demo ↗

Borders

Bordered wraps the accordion in a rounded outline with side padding.

open demo ↗

Card

Inside a padded surface — composition with SurfaceCard.

open demo ↗

API

OptionTypeDescription
OpenintThe expanded item in single mode; -1 = all closed.
MultipleboolIndependent panels, tracked in Expanded.
Expanded[]boolPer-item state in Multiple mode.

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.