Spinner
The standalone loading arc — Button's spinner, mountable anywhere.
Self-invalidating; mount it only while loading. SpinnerTint takes
any ink.
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 get github.com/ikaito-com/lotusui
# or vendor the source into your app:
go run github.com/ikaito-com/lotusui/cmd/lotusui add spinner
Usage
lotusui.Spinner(th, 24)
lotusui.SpinnerTint(th, 24, th.Palette.BrandFg)
Badge
Inside a Badge via its Start slot — the syncing states.
lotusui.Badge(th, "Updating", lotusui.BadgeOpts{Variant: lotusui.BadgeSecondary,
Start: lotusui.Spinner(th, 12)})
API
| Option | Type | Description |
|---|---|---|
Spinner(th, size) | unit.Dp | The arc in muted ink; self-invalidating. |
SpinnerTint(th, size, color) | color.NRGBA | The arc in any ink. |