functions

Columns
Edited: Sunday 25 January 2026

Columns

Category: Layouts
File: layouts.go
Package: ui

Signature

1func Columns(children ...layout.FlexChild) W

Description

Columns arranges flex children horizontally in a row layout.
Children can be Rigid (fixed width) or Flexed (proportional width).

Example:

layout := Columns(
    Rigid(Label("Left")),
    Flexed(1, Label("Center")),
    Rigid(Label("Right")),
)

Flexed children share remaining width proportionally by their weight.

Examples

Columns

1{
2	layout := Columns(
3		Rigid(Label("Left")),
4		Flexed(1, Label("Center")),
5		Rigid(Label("Right")),
6	)
7	_ = layout
8}

Example Output


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

Backlinks