github charmbracelet/bubbles v0.20.0

latest release: v2.0.0-alpha.1
12 days ago

Focus. Breathe.

This features support for Bubble Tea's new focus-blur feature as well as a quality-of-life update to paginator. Enjoy!

Focus

You heard that right. Focus-blur window events are now enabled for textinput and textarea which were recently added to Bubble Tea v1.1.0. As long as WithReportFocus is enabled in your Program you'll automatically get nicer inputs.

To enable focus reporting:

p := tea.NewProgram(model{}, tea.WithReportFocus())

Remember to stay focused and hydrated!

Paginator opts

Speaking of functional arguments, paginator also received some some new quality-of-life startup options, courtesy @nervo.

p := paginator.New(
	paginator.WithPerPage(42),
	paginator.WithTotalPages(42),
)

Of course, you can still set the values on the model directly too:

p := paginator.New()
p.PerPage = 42
p.TotalPages = 24

Happy paging!

Changelog

New!

Deps


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.

Don't miss a new bubbles release

NewReleases is sending notifications on new releases.