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>
12 lines
390 B
Go
12 lines
390 B
Go
package layout
|
|
|
|
import "github.com/egoist/mygo/ui"
|
|
|
|
// Inline is a wrapping row in theme gaps; size animates.
|
|
func Inline(c *ui.Context, gap float32, content func()) ui.Element {
|
|
if !finite(gap) || gap < 0 {
|
|
panic("layout: Inline gap must be finite and non-negative")
|
|
}
|
|
return ui.Row(c).Wrap().Gap(c.Theme().Space(gap)).Transition(ui.ElementTransition{Size: true}).Children(content)
|
|
}
|