focus

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package focus demonstrates a screen with multiple components and tab/shift-tab focus cycling. Only the focused component receives keystrokes; the others sit dim with their inactive border color.

The pattern is: keep an int focus index, intercept tab/shift-tab in Update, call Blur on every component and Focus on the active one, and forward all other messages to the focused component only — otherwise typing in the input would also move list cursors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(t theme.Theme) screen.Screen

New returns the focus demo's root screen.

Types

This section is empty.

Jump to

Keyboard shortcuts

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