functions
Grid| modified | Sunday 25 January 2026 |
|---|
Category: Layouts
File: layouts.go
Package: ui
1func Grid(l *List, count int, minItemSize int, ele layout.ListElement) W
Grid creates a responsive grid layout that adapts to available width.
Items are arranged in rows with consistent sizing based on minItemSize.
Example:
list := NewVerticalList()
grid := Grid(list, 20, 100, func(c C, i int) D {
return Label(fmt.Sprintf("Item %d", i))(c)
})
The grid calculates columns automatically: perRow = width / minItemSize
1{
2 list := NewVerticalList()
3 grid := Grid(&list, 20, 100, func(c C, i int) D {
4 return Label("Item")(c)
5 })
6 _ = grid
7}

This documentation is auto-generated. To update, run make docs