column

package
v0.1.122 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alignment

type Alignment = layout.Alignment
const (
	Start Alignment = iota
	End
	Middle
	Baseline
)

type ColumnOption

type ColumnOption func(o *ColumnOptions)

func WithAlignment

func WithAlignment(alignment Alignment) ColumnOption

func WithModifier

func WithModifier(modifier ui.Modifier) ColumnOption

func WithSpacing

func WithSpacing(spacing Spacing) ColumnOption

type ColumnOptions

type ColumnOptions struct {
	Modifier ui.Modifier

	// Spacing controls the distribution of space left after
	// layout.
	Spacing Spacing
	// Alignment is the alignment in the cross axis.
	Alignment Alignment
}

func DefaultColumnOptions

func DefaultColumnOptions() ColumnOptions

type Composable

type Composable = api.Composable

func Column

func Column(content Composable, options ...ColumnOption) Composable

type Composer

type Composer = api.Composer

type Spacing

type Spacing = layout.Spacing
const (
	// SpaceEnd leaves space at the end.
	SpaceEnd Spacing = iota
	// SpaceStart leaves space at the start.
	SpaceStart
	// SpaceSides shares space between the start and end.
	SpaceSides
	// SpaceAround distributes space evenly between children,
	// with half as much space at the start and end.
	SpaceAround
	// SpaceBetween distributes space evenly between children,
	// leaving no space at the start and end.
	SpaceBetween
	// SpaceEvenly distributes space evenly between children and
	// at the start and end.
	SpaceEvenly
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL