space

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2026 License: MIT Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package space is the spacing scale every frame, pane and card lays out with.

Index

Constants

View Source
const (
	// InsetX is the number of blank columns between a vertical line, such as a frame border or a pane divider, and the content beside it.
	InsetX = 2
	// InsetY is the number of blank rows between a horizontal line, such as a frame border or a divider rule, and the content beside it.
	InsetY = 1
	// CompactInsetX replaces InsetX on a narrow terminal.
	CompactInsetX = 1
	// CompactCols is the widest terminal, in columns, that counts as narrow and takes CompactInsetX.
	CompactCols = 80
	// Mark is the number of columns that a pane reserves at its left edge for the selection mark, so text stays put when the mark shows.
	Mark = 1
	// Lead is the column where a pane's text starts: the mark column and one blank column.
	Lead = 2
	// Gap is the number of blank rows between two blocks in a pane.
	Gap = 1
	// Rail is the number of columns a scrollbar takes at a pane's right edge: one blank column and the bar.
	Rail = 2
)

Variables

This section is empty.

Functions

func InsetXAt

func InsetXAt(cols int) int

InsetXAt returns the number of blank columns between a vertical line and the content beside it on a terminal cols columns wide: CompactInsetX on a narrow terminal and InsetX on a wider one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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