progress

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package progress provides a themed progress bar component.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

Model wraps the Bubbles progress component with theming.

func New

func New(theme styles.Theme, width int) *Model

New creates a new progress bar.

func (*Model) Init

func (m *Model) Init() tea.Cmd

Init implements tea.Model.

func (*Model) SetPercent

func (m *Model) SetPercent(percent float64) tea.Cmd

SetPercent returns a command to animate to the given percentage (0-1).

func (*Model) SetWidth

func (m *Model) SetWidth(width int)

SetWidth sets the progress bar width.

func (*Model) Update

func (m *Model) Update(msg tea.Msg) tea.Cmd

Update implements tea.Model.

func (*Model) View

func (m *Model) View() string

View renders the progress bar at its current percentage.

func (*Model) ViewAs

func (m *Model) ViewAs(percent float64) string

ViewAs renders the progress bar at a specific percentage without animation. Percent should be 0-100.

Jump to

Keyboard shortcuts

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