chrome

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package chrome demonstrates theme-owned border shape: the two slots a Theme carries for chrome, and the fact that changing one re-skins every component drawn from that theme without touching any component.

The left column picks Theme.BorderShapeActive/Inactive (ordinary components) and Theme.BorderShapeOverlay (things that float above content). Everything on screen — the pickers included — is rebuilt from the modified theme, so what you are looking at is the same code path any app gets.

The two slots are deliberately separate: an overlay reads as raised because its border differs from the pane it covers. Set both pickers to the same shape and the modal flattens into the content behind it, which is the thing the split exists to prevent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(t theme.Theme) screen.Screen

Types

type Screen

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

func (*Screen) Help

func (s *Screen) Help() []key.Binding

func (*Screen) Init

func (s *Screen) Init() tea.Cmd

func (*Screen) IsCapturingKeys

func (s *Screen) IsCapturingKeys() bool

func (*Screen) Layout

func (s *Screen) Layout() layout.Node

func (*Screen) OnEnter

func (s *Screen) OnEnter(any) tea.Cmd

func (*Screen) SetTheme

func (s *Screen) SetTheme(t theme.Theme)

SetTheme takes the app's palette and rebuilds from it, keeping the two shape choices the user made.

func (*Screen) Title

func (s *Screen) Title() string

func (*Screen) Update

func (s *Screen) Update(msg tea.Msg) (screen.Screen, tea.Cmd)

Jump to

Keyboard shortcuts

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