lotusui
A Go design system for desktop and mobile — one codebase, native apps. Web when you want it.
GitHub

SimpleGrid

Equal cells: continuous minChildWidth or stepped Columns.

A lotusui extension. Continuous mode derives column count from available width / MinChildWidth (never below 1, never above MaxCols). Stepped mode sets Columns: Cols(…).At(…) against Theme breakpoints. Every cell in a row gets the tallest cell's height. Reach for Grid when you need explicit tracks and spans.

Installation

Use the module import (the default), or own the source: lotusui add vendors the component into your app and lotusui update keeps the copy mergeable — see Registry.

Go
go get github.com/ikaito-com/lotusui

# or vendor the source into your app:
go run github.com/ikaito-com/lotusui/cmd/lotusui add grid

Usage — continuous columns

Columns derive from available width / MinChildWidth. Narrow the window and the grid reflows smoothly.

open demo ↗

Equal-height rows

A measure pass finds the tallest cell per row; every sibling gets that height as its minimum — cards in a row stay flush.

open demo ↗

Stepped columns

When Columns is set, minChildWidth is ignored — same Chakra columns={{…}} idea as Grid.Cols.

open demo ↗

API

OptionTypeDescription
th*ThemeBreakpoints for stepped Columns / Gaps.
items[]TOne cell per item, any type.
SimpleGridProps.MinChildWidthunit.DpContinuous mode: width / this → columns.
SimpleGridProps.MaxColsintContinuous mode upper bound.
SimpleGridProps.ColumnsResponsiveIntStepped mode when Set().
SimpleGridProps.Gap / Gapsunit.Dp / ResponsiveDpSpacing between cells.
cellfunc(C, T) DRenders one item — a tile, a Card, anything.

lotusui is a Go design system for native desktop and mobile — and the web when you want it. Docs demos are the real components (WebAssembly) — one gallery app, each Preview an iframe addressed by URL hash.