MCPcopy Create free account
hub / github.com/charmbracelet/bubbles / WithSpringOptions

Function WithSpringOptions

progress/progress.go:162–167  ·  view source on GitHub ↗

WithSpringOptions sets the initial frequency and damping options for the progress bar's built-in spring-based animation. Frequency corresponds to speed, and damping to bounciness. For details see: https://github.com/charmbracelet/harmonica

(frequency, damping float64)

Source from the content-addressed store, hash-verified

160//
161// https://github.com/charmbracelet/harmonica
162func WithSpringOptions(frequency, damping float64) Option {
163 return func(m *Model) {
164 m.SetSpringOptions(frequency, damping)
165 m.springCustomized = true
166 }
167}
168
169// WithScaled sets whether to scale the blend/gradient to fit the width of only
170// the filled portion of the progress bar. The default is false, which means the

Callers

nothing calls this directly

Calls 1

SetSpringOptionsMethod · 0.80

Tested by

no test coverage detected