Files
ZacharyZhang-NYandClaude Opus 5.5 4efaf2680f 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>
2026-10-17 02:49:32 -04:00

11 lines
342 B
Go

package layout
import "github.com/egoist/mygo/ui"
// Inset is a recessed surface whose color follows the theme.
func Inset(c *ui.Context, content func()) ui.Element {
t := c.Theme()
e := ui.Column(c).Gap(t.Space(2)).Padding(t.Space(3)).Radius(t.Radius)
return e.Background(e.AnimateColor("bg", t.Surface, ui.Smooth)).Children(content)
}