WithColorFunc sets a function that can be used to dynamically fill the progress bar based on the current percentage. total is the total filled percentage, and current is the current percentage that is actively being filled with a color. When specified, this overrides any other defined colors and sca
(fn ColorFunc)
| 123 | // return lipgloss.Color("#0000FF") |
| 124 | // }), |
| 125 | func WithColorFunc(fn ColorFunc) Option { |
| 126 | return func(m *Model) { |
| 127 | m.colorFunc = fn |
| 128 | m.blend = nil |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | // WithFillCharacters sets the characters used to construct the full and empty |
| 133 | // components of the progress bar. |