Documentation
¶
Index ¶
- Variables
- type Spinner
- func (s *Spinner) Accessible(accessible bool) *Spinner
- func (s *Spinner) Action(action func()) *Spinner
- func (s *Spinner) ActionWithErr(action func(context.Context) error) *Spinner
- func (s *Spinner) Context(ctx context.Context) *Spinner
- func (s *Spinner) Init() tea.Cmd
- func (s *Spinner) Output(w io.Writer) *Spinner
- func (s *Spinner) Run() error
- func (s *Spinner) Style(style lipgloss.Style) *Spinner
- func (s *Spinner) Title(title string) *Spinner
- func (s *Spinner) TitleStyle(style lipgloss.Style) *Spinner
- func (s *Spinner) Type(t Type) *Spinner
- func (s *Spinner) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (s *Spinner) View() string
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Line = Type(spinner.Line) Dots = Type(spinner.Dot) MiniDot = Type(spinner.MiniDot) Jump = Type(spinner.Jump) Points = Type(spinner.Points) Pulse = Type(spinner.Pulse) Globe = Type(spinner.Globe) Moon = Type(spinner.Moon) Monkey = Type(spinner.Monkey) Meter = Type(spinner.Meter) Hamburger = Type(spinner.Hamburger) Ellipsis = Type(spinner.Ellipsis) )
Functions ¶
This section is empty.
Types ¶
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
Spinner represents a loading spinner. To get started simply create a new spinner and call `Run`.
s := spinner.New() s.Run()
⣾ Loading...
func (*Spinner) Accessible ¶
Accessible sets the spinner to be static.
func (*Spinner) ActionWithErr ¶
ActionWithErr sets the action of the spinner.
This is just like Spinner.Action, but allows the action to use a `context.Context` and to return an error.
func (*Spinner) Output ¶
Output set the output for the spinner. Default is STDOUT when Spinner.Accessible, STDERR otherwise.
func (*Spinner) TitleStyle ¶
TitleStyle sets the title style of the spinner.
Click to show internal directories.
Click to hide internal directories.