functions
ZebraList| modified | Sunday 25 January 2026 |
|---|
Category: Widgets
File: lists.go
Package: ui
1func ZebraList(l *List, len int, ele layout.ListElement) W
ZebraList wraps a list with alternating row backgrounds for improved readability.
Even-indexed rows (0, 2, 4…) receive a light background color (SILVER_100).
Example:
list := NewVerticalList()
zebra := ZebraList(&list, 50, func(c C, i int) D {
return Label(fmt.Sprintf("Row %d", i))(c)
})
Commonly used for tables and data lists to distinguish rows visually.
1{
2 list := NewVerticalList()
3 zebra := ZebraList(&list, 8, func(c C, i int) D {
4 return Inset1(Label(fmt.Sprintf("Row %d", i)))(c)
5 })
6 _ = zebra
7}

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