Add layout components 0001-0025

Stack through StickyHeader, with behavior tests and gallery demos.
kit gains Arrive, Settle (paint-time layout check) and Shade.
Several actions return named ui.Element results; mygo vet forbids
elements in structs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-17 02:49:32 -04:00
1 parent b34562333b
commit 4efaf2680f
41 files changed
+1765 -11

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
package layout
import "github.com/egoist/mygo/ui"
// Stack is a column gapped in theme units; size animates.
func Stack(c *ui.Context, gap float32, content func()) ui.Element {
if !finite(gap) || gap < 0 {
panic("layout: Stack gap must be finite and non-negative")
}
return ui.Column(c).Gap(c.Theme().Space(gap)).Transition(ui.ElementTransition{Size: true}).Children(content)
}