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

Skeleton

The loading placeholder: rounded blocks and circles pulsing on the shared clock.

Give it the shape of the content it stands in for. Zero width fills the available width; SkeletonCircle is the round form. Self-invalidating — mount only while loading.

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 skeleton

Usage

Go
layout.Flex{Alignment: layout.Middle}.Layout(gtx,
	layout.Rigid(lotusui.SkeletonCircle(th, 48)),
	layout.Rigid(lotusui.HSpacer(th.Space.MD)),
	layout.Rigid(lotusui.VStack(th.Space.SM,
		lotusui.Skeleton(th, 250, 16),
		lotusui.Skeleton(th, 200, 16),
	)),
)

Avatar

Go
lotusui.SkeletonCircle(th, 40) // beside two text lines

Card

Two header lines and a 16:9 media block inside a Card.

Go
lotusui.Card(th, lotusui.CardOpts{}, lotusui.VStack(th.Space.SM,
	lotusui.Skeleton(th, 180, 16),
	lotusui.Skeleton(th, 140, 16),
	mediaBlockSkeleton, // Skeleton(th, 0, h) at 16:9
))

Form

Go
lotusui.VStack(th.Space.LG,
	lotusui.VStack(th.Space.SM, lotusui.Skeleton(th, 80, 16), lotusui.Skeleton(th, 0, 32)),
	lotusui.VStack(th.Space.SM, lotusui.Skeleton(th, 96, 16), lotusui.Skeleton(th, 0, 32)),
	lotusui.Skeleton(th, 96, 32),
)

Table

Go
// five rows of [flexible, 96dp, 80dp] lines

Text

Go
lotusui.VStack(th.Space.SM,
	lotusui.Skeleton(th, 0, 16),
	lotusui.Skeleton(th, 0, 16),
	threeQuarterLine,
)

API

OptionTypeDescription
Skeleton(th, w, h)unit.DpA pulsing rounded block; w = 0 fills the available width.
SkeletonCircle(th, d)unit.DpThe round form — avatars, icon slots.

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