Well, here is a pull request on a component i really found missing in the bubbletea ecosystem: a scrollbar \o/
Only a vertical one, available as a model, is provided:
sb := scrollbar.NewVertical()
It is easily customizable with styles
sb.Style = sb.Style.Border(lipgloss.RoundedBorder(), true) // Beautiful rounded borders around the bar
sb.ThumbStyle = sb.ThumbStyle.SetString("≡") // Change thumb apperance
m.scrollbar, cmd = m.scrollbar.Update(viewport.Height)
m.scrollbar, cmd = m.scrollbar.Update(viewport) // Get the total, visible and offset parameters from viewport
If you're interested, feel free to review, comment, etc... ❤️
That being said, there are several points on which I would like advice:
Do i have to make the scrollbar struct a real model (Update method returns a tea.Model) or an hybrid one (Update method returns the struct itself) ?
Is it better to provide some options to the constructor ? something like:
Well, here is a pull request on a component i really found missing in the bubbletea ecosystem: a scrollbar \o/
Only a vertical one, available as a model, is provided:
It is easily customizable with styles
It can updated by dedicated messages...
...or directly linked to a viewport:
If you're interested, feel free to review, comment, etc... ❤️
That being said, there are several points on which I would like advice:
example.gif
). Is there something i can do ?huh, and I almost forgot the demo :)