Layout

Grid

Responsive columns that preserve document order.

components.Grid · GridProps

One idea

Columns adapt to available space.

Another idea

The content stays in document order.

Use it well.

Place block-level content in its children. Columns stack as available space narrows; no JavaScript measures the viewport.

Explore the full demo →

This is the source compiled for the preview. Select the text to copy it, or download the file. Change the package name and demo routes for your application.

package examples

import "github.com/Tend-Stack/TendUI/v2026/components"

templ ExampleGrid() {
	@components.Grid(components.GridProps{}) {
		@components.Card(components.CardProps{}) {
			<h3>One idea</h3>
			<p>Columns adapt to available space.</p>
		}
		@components.Card(components.CardProps{}) {
			<h3>Another idea</h3>
			<p>The content stays in document order.</p>
		}
	}
}