ui

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 3 Imported by: 2 modules, 1 package

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 ui bundles the per-program rendering context — theme, key scheme, and glyph set. A Scope is immutable after construction; to change appearance, build a new Scope and swap the pointer. There is no process state to install: components read the Scope they are handed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scope

type Scope struct {
	Theme  theme.Theme
	Keys   keys.Scheme
	Glyphs glyph.Set
}

Scope is one program's rendering context.

func Default

func Default() *Scope

Default returns a Scope over the built-in defaults: the default theme and scheme, and the glyph set for the default mode (the one piece of process state left, by design — see glyph.SetMode).

func (*Scope) Bullet

func (s *Scope) Bullet(msg string) string

Bullet renders an accent-colored bullet followed by msg.

func (*Scope) Success

func (s *Scope) Success(msg string) string

Success renders a success-colored check followed by msg.

Jump to

Keyboard shortcuts

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