progressbar

package
v0.0.0-...-9a879d8 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Widget

type Widget struct {
	orvyn.BaseWidget

	progress.Model

	// TitleStyle holds the style of the title. Theme TitleStyleID by default.
	TitleStyle lipgloss.Style

	// MaxValue is used to define the progress in the title.
	MaxValue int

	// CurrentValue is used to define the progress in the title.
	CurrentValue int
	// contains filtered or unexported fields
}

Widget is a progressbar that should be used as a progress indicator.

func New

func New(title string) *Widget

New creates and return a new progress bar *Widget.

func (*Widget) GetMinSize

func (w *Widget) GetMinSize() orvyn.Size

func (*Widget) GetPreferredSize

func (w *Widget) GetPreferredSize() orvyn.Size

func (*Widget) Render

func (w *Widget) Render() string

func (*Widget) Resize

func (w *Widget) Resize(size orvyn.Size)

func (*Widget) SetColor

func (w *Widget) SetColor(color lipgloss.Color)

SetColor helps changing the bar color.

func (*Widget) SetPercentageStyle

func (w *Widget) SetPercentageStyle(style lipgloss.Style)

SetPercentageStyle allows to define the percentage style.

func (*Widget) SetPercentageVisibility

func (w *Widget) SetPercentageVisibility(b bool)

SetPercentageVisibility changes the visibility of the percentage in the bar.

func (*Widget) SetTitleProgressVisibility

func (w *Widget) SetTitleProgressVisibility(b bool)

SetTitleProgressVisibility changes the visiblity of the current progress directly in the title. For example : (12/100)

func (*Widget) SetTitleVisibility

func (w *Widget) SetTitleVisibility(b bool)

SetTitleVisibility changes the visibility of the title.

func (*Widget) Update

func (w *Widget) Update(msg tea.Msg) tea.Cmd

Jump to

Keyboard shortcuts

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