align

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Align

type Align struct {
	// contains filtered or unexported fields
}

Align aligns a renderable horizontally and vertically within a given space.

func New

func New(renderable console.Renderable, align Method, vertical VerticalMethod, style *style.Style, pad bool, width, height int) *Align

New creates an Align renderable.

func (*Align) Render

func (a *Align) Render(c *console.Console, opts console.Options) []segment.Segment

Render implements console.Renderable.

type Method

type Method string

Method represents horizontal alignment.

const (
	Left   Method = "left"
	Center Method = "center"
	Right  Method = "right"
)

type VerticalMethod

type VerticalMethod string

VerticalMethod represents vertical alignment.

const (
	Top    VerticalMethod = "top"
	Middle VerticalMethod = "middle"
	Bottom VerticalMethod = "bottom"
)

Jump to

Keyboard shortcuts

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