common

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Colors = map[Key]color.RGBA{
	Selected:       {R: 0x2d, G: 0x2c, B: 0x35, A: 0xFF},
	DarkerSelected: {R: 0x20, G: 0x1F, B: 0x26, A: 0xFF},
}

Functions

func LipglossColorToHex added in v0.8.0

func LipglossColorToHex(c color.Color) string

lipglossColorToHex converts a color.Color to hex string

func RenderScrollbar added in v0.11.0

func RenderScrollbar(viewHeight, totalLines, yOffset int) string

RenderScrollbar renders a vertical scrollbar track with a thumb indicator. It takes the viewport height, total number of content lines, and the current scroll offset (YOffset). Returns an empty string if all content fits.

Types

type Common

type Common struct {
	Width, Height int
}

Common is a struct that contains the width and height of a component.

type Component

type Component interface {
	SetSize(width, height int) tea.Cmd
}

type ErrMsg

type ErrMsg struct {
	Err error
}

type Key added in v0.8.0

type Key int
const (
	Selected Key = iota
	DarkerSelected
)

Available colors.

Jump to

Keyboard shortcuts

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