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

Split

The carousel of panes — content is revealed and hidden, never reflowed.

Split arranges a screen's main panes as a carousel. All panes live on one horizontal strip behind an overflow-hidden viewport; the screen's depth decides what shows. Two eased values drive every transition — pane 0's width fraction and the strip's X translation. Panes are only ever revealed or hidden by the viewport's edges; content never re-flows mid-animation.

Scroll grammar: SplitBox wraps SurfaceCard. Use SplitColumnScroll (column scrolls, stacked natural cards), SplitBoxScroll (hug then scroll inside one card), or SplitBoxFillScroll (flush height, Flexed body + Rigid footer — no outer list). Pane helpers subtract 2×CardProps{}.Pad() from content Max.Y; they do not nest Scrollable.

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 split

Usage

Pass every pane the screen can show — including currently hidden ones — so mid-animation frames render content sliding, never popping. Build each pane with SplitBox so appearing and disappearing panes look identical. LayoutSolo is the full-width pivot: two panes, one visible at a time.

Go
var s lotusui.Split

s.Layout(gtx, th.Space.MD, depth,
	lotusui.SplitBox(th, listPane),
	lotusui.SplitBox(th, detailPane),
	lotusui.SplitBox(th, editorPane),
)

VSlide

VSlide is Split's vertical sibling for full-screen pivots: the over-screen slides up from the bottom while the base screen is pushed up and away. Settled, only the visible screen is laid out; mid-flight, recorded frames are merely translated — verbatim pixels sliding, so moving content can never reflow, compress, or flicker.

Go
var v lotusui.VSlide

v.Layout(gtx, th, expanded, baseScreen, overScreen)

Column scroll

Independent columns: stack natural-height cards inside SplitColumnScroll — the column scrolls, not each card.

Go
var col widget.List

lotusui.SplitColumnScroll(th, &col, 0, lotusui.VStack(th.Space.MD,
	lotusui.SplitBox(th, cardA),
	lotusui.SplitBox(th, cardB),
	lotusui.SplitBox(th, cardC),
))

Pane scroll

SplitBoxScroll hugs while short; past maxH the body scrolls inside the card. Content Max.Y is maxH − 2×CardProps{}.Pad().

Go
var pane widget.List

lotusui.SplitBoxScroll(th, &pane, 0, tallBody)

API

OptionTypeDescription
gapunit.DpLayout parameter — spacing between the strip's panes.
depthintWhich panes the viewport shows: 0 = pane 0 full width; n = panes n-1 and n side by side.
boxes...layout.WidgetEvery pane the screen can show, hidden ones included, so mid-animation frames slide instead of pop.
SplitBoxwidgetSurfaceCard wrapper for a pane.
SplitColumnScrollwidgetFixed-height column viewport; stack SplitBoxes inside.
SplitBoxScrollwidgetHug while short; scroll inside the card past maxH (budgets CardProps{}.Pad()).
SplitBoxFillScrollwidgetFlush maxH card; Min.Y=Max.Y for Flexed body + Rigid footer (no list).

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