Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Oct 15, 2025

This PR contains the following updates:

Package Change Age Confidence
github.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7 -> v2.0.0-rc.1 age confidence

Release Notes

charmbracelet/bubbles (github.com/charmbracelet/bubbles)

v2.0.0-rc.1

Compare Source

This is the first step towards the final v2.0.0 release. In this release, we've introduced a variety of changes to expose more functionality from Bubbles and have fixed numerous issues!

This release now uses the charm.land/* domain for imports 🖥️

go get charm.land/bubbles/v2@​v2.0.0-rc.1
Progress 🌈

Special thanks to the legendary @​lrstanley for his outstanding work on improving the blend algorithm in the Progress Bubble.

Textarea ✍️

You can now use PageUp, PageDown, ScrollYOffset, ScrollPosition, MoveToBeginning , and MoveToEnd, along with numerous bug fixes!

Viewport 📜

The Viewport Bubble now supports horizontal mouse wheel scrolling, thanks to @​UnseenBook.

Table 🔢

This release includes a critical out-of-bound fix by @​s0ders.

Changelog

New!
Fixed
Docs
Other stuff

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.0.0-beta.1

Compare Source

Ready for Bubbles v2 Beta?

We're excited to share Bubbles v2.0.0-beta.1 with you! This release builds on the last alpha release and includes a few more API changes and improvements. As usual, the upgrade path is pretty straightforward, but let us know if you have any questions.

Bear in mind you’ll want to use this updates alongside v2.0.0-beta.1 versions of Bubble Tea and Lip Gloss.

# Collect them all
go get github.com/charmbracelet/[email protected]
go get github.com/charmbracelet/[email protected]
go get github.com/charmbracelet/[email protected]

Let’s dive in!

The Init you know and love is back

After spending time with many different forms of Init, we've decided the v1 signature is the right way to go after all. Init is a bit too redundant for our tastes given that initialization is already happening in New. Note that this change is in alignment with current shape of Init in Bubble Tea.

// Before in alpha.2
func (m Model) Init() (Model, tea.Cmd)

// After
func (m Model) Init() tea.Cmd

What’s Changed?

In general, we've made a lot of small changes to Bubbles for consistency and future proofing. There are a lot of changes here, but we've found upgrading pretty easy regardless. If you're having trouble with anything let us know in the discussions.

🥕 List
  • Styles.FilterCursor and Styles.FilterPrompt have been removed and consolidated into the new Styles.Filter
👟 Progress
  • The Model.EmptyColor and Model.FullColor members have been changed from string to image/color.Color
  • Model.Update now returns a Model instead of a tea.Model
  • WithColorProfile has been removed (Bubble Tea now manages this automatically)
  • WithSolidFill now takes an color.Color (from the image package) instead of a string
✏️ Textarea

The big change to textarea is that you now have the option to use a real cursor per Bubble Tea v2.0.0-beta1. The feature is opt-in, so by default if you don't do anything your programs will continue to use the easy-breezy virtual cursor.

To get an idea of how to use a real cursor with textarea see
the v2 textarea example.

  • Model.Cursor is now a function that returns a *tea.Cursor (formerly, it was the virtual cursor model)
  • Model.SetCursor has been renamed to Model.SetCursorColumn
  • CursorStyle has been added to define the cursor style
  • Model.VirtualCursor (a bool) has been added to define whether the textarea should render a virtual cursor; set to false when using a real cursor
  • Styles.Cursor has been added to define the cursor style
📜 Textinput

Most of the changes in textinput are to bring it to parity with textarea,
including support for a real cursor. For an example illustrating the use of
textinput with a real cursor see
the v2 textinput example.

Most styling has been moved into StyleState which contains styling for
focused and blurred states.

  • Model.CompletionStyle has been moved to StylesState.Suggestion
  • Model.PlaceholderStyle has been moved to StylesState.Placeholder
  • Model.PromptStyle has been and moved to StyleState.Prompt
  • Model.TextStyle has been moved to StyleState.Text
  • CursorStyle has been added to define the cursor style
  • Model.VirtualCursor was added; use it to disable the virtual cursor
  • Model.Styles (and Styles) was added to house all styling.
  • StyleState was added to manage styling for focused and blurred states
  • Model.Cursor is now a func() *tea.Cursor for real cursor support (formerly, it was the virtual cursor model)
  • DefaultStyles has been added
  • DefaultDarkStyles has been added
  • DefaultLightStyles has been added
📦 Viewport

The new viewport now supports horizontal scrolling as well as setting a custom gutter column! You can also now scroll horizontally with the left and right arrow keys. Finally, you can now highlight parts of what's being viewed based on regex.

vp := viewport.New()
vp.SetContent("hello world")

// Show line numbers:
vp.LeftGutterFunc = func(info viewport.GutterContext) string {
  if info.Soft {
    return "     │ "
  }
  if info.Index >= info.TotalLines {
    return "   ~ │ "
  }
  return fmt.Sprintf("%4d │ ", info.Index+1)
}

// Highlight things:
vp.SetHighlights(regexp.MustCompile("hello").FindAllStringIndex(vp.GetContent(), -1))
vp.HighlightNext()      // highlight and navigate to next match
vp.HighlightPrevious()  // highlight and navigate to previous match
vp.ClearHighlights()    // clear all highlights

You may now also let viewport do the soft wrapping for you:

vp := viewport.New()
vp.SoftWrap = true
vp.SetContent("hello world from a very long line")

But, if you need more fine control on soft wrapping, you can also use the SetContentLines method. This method allows you to set "virtual lines", which may contain \n in them. These lines are automatically treated as soft wraps, and scrolling also takes then into consideration.

Like details?

Here’s the full changelog since v2.0.0-alpha.2

💝 That’s a wrap!

Feel free to reach out, ask questions, give feedback, and let us know how it's going. We’d love to know what you think.


Part of Charm.

The Charm logo

Charm热爱开源 • Charm loves open source • نحنُ نحب المصادر المفتوحة

v2.0.0-alpha.2

Compare Source

Smells like Bubbles v2 Alpha 2!

Thanks for trying out Bubbles v2.0.0-alpha.2! This release was designed to work with Bubble Tea and Lip Gloss v2 alphas with the same tag, so make sure you catch ’em all:

go get github.com/charmbracelet/bubbletea/v2@​v2.0.0-alpha.2
go get github.com/charmbracelet/bubbles/v2@​v2.0.0-alpha.2
go get github.com/charmbracelet/lipgloss/v2@​v2.0.0-alpha.2

There are a lot of small API changes in this release, around two general ideas:

  • Consistency across Bubbles
  • Manual light/dark background management for Lip Gloss v2 (see below)

We've found upgrading pretty easy, especially with a linter, but let us know how it goes for you. Read on for the breakdown.

[!NOTE]
When in doubt, check the examples for reference: they've all been updated for v2.

A Note on Light and Dark Styles

Some Bubbles, like help, offer defaults for light and dark background colors. Selecting one or the other now a manual process, and you have two options.

🎩 The Best Way

Ideally, you have Bubble Tea query the background color for you. This means that you'll be properly querying the correct input and outputs with your program, and the query will happen in lockstep with the application.

// Query for the background color.
func (m model) Init() (tea.Model, tea.Cmd) {
	return m, tea.RequestBackgroundColor
}

// Listen for the response and initialize your styles accordigly.
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
	switch msg := msg.(type) {
	case tea.BackgroundColorMsg:
		// Initialize your styles now that you know the background color.
		m.help = help.DefaultStyles(msg.IsDark())
		return m, nil
	}
}

If you're using Wish you must do it this way in to get the background color of the client.

🤠 The Quick Way

The quick way is to use detect the background color via the compat package in Lip Gloss. It's less recommended because it contains blocking I/O that operates independently of Bubble Tea and, when used with Wish it will not return the background color of the client (because it's running locally on the server).

import "github.com/charmbracelet/lipgloss/v2/compat"

var hasDarkBG = compat.HasDarkBackground()

func main() {
    var m model

    h := help.New()
    h.Styles = help.DefaultStyles(hasDarkBG)

    // And so on...
    m.help = h
}

For details on the compat package see the Lip Gloss v2.0.0-alpha.2 release notes.

👀 Also Note

You can also just apply defaults manually.

h.Styles = help.DefaultLightStyles() // light mode!
h.Styles = help.DefaultDarkStyles()  // jk dark mode

What’s Changed: the Laundry List

Filepicker
  • Removed: DefaultStylesWithRenderer(). Lip Gloss is pure now, so just use DefaultStyles().
  • Model.Height has been broken into a getter and setter; use Model.SetHeight(int) and Model.Height() int instead
Help

help now defaults to using colors for dark backgrounds. You can manually change them with DefaultLightStyles() and DefaultDarkStyles():

h := help.New()
h.Styles = help.DefaultDarkStyles()  // dark mode
h.Styles = help.DefaultLightStyles() // light mode

Or, just detect the background color and apply the appropriate set of styles accordingly:

func (m Model) Init() (tea.Model, tea.Cmd) {
	// Ask for the background color.
	return m, tea.RequestBackgroundColor
}

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
	switch msg := msg.(type) {
	case tea.BackgroundColorMsg:
		// We know the background color, so let’s update our styling.
		m.help.Styles = help.DefaultStyles(msg.IsDark())
	}
}
List
  • DefaultStyles() now takes a boolean to determine whether it should be rendered with light or dark styles: DefaultStyles(isDark bool)
  • DefaultItemStyles() now takes a boolean to determine whether it should be rendered with light or dark styles: DefaultItemStyles(isDark bool)
Paginator
  • The global variable DefaultKeyMap is now a function: func DefaultKeyMap() KeyMap
Progress
  • Model.Width has been broken into a getter and setter; use Model.SetWidth(int) and Model.Width() int instead
p := progress.New()

// Before
p.Width = 25
fmt.Printf("%w is a good width", p.Width)

// After
p.SetWidth(25)
fmt.Printf("%w is a good width", p.Width())
Stopwatch
  • NewWithInterval(time.Duration) has been removed. Pass an Option to New() instead: New(WithInterval(time.Duration))
Table
  • Model.Width has been broken into a getter and setter; use Model.SetWidth(int) and Model.Width() int instead
  • Model.Height has been broken into a getter and setter; use Model.SetHeight(int) and Model.Height() int instead
Textarea
  • The global variable DefaultKeyMap is now a function: func DefaultKeyMap() KeyMap
  • Model.FocusedStyle and Model.BlurredStyle have been replaced by Model.Styles.Focused and Model.Styles.Blurred
  • DefaultStyles() (blurred, focused Style) is now DefaultStyles(isDark bool) Styles. See help above for an example on how to work with this.
Textinput
  • The global variable DefaultKeyMap is now a function: func DefaultKeyMap() KeyMap
  • Model.Width has been broken into a getter and setter; use Model.SetWidth(int) and Model.Width() int instead
Timer
  • NewWithInterval(time.Duration) has been removed. Pass an Option to New() instead: New(time.Duration, WithInterval(time.Duration))
Viewport
  • Model.Width and Model.Height have been replaced with getters and setters:
m := v.New()

// Before
vp.Width = 40
vp.Height = 80
fmt.Println("%d is my favorite width", vp.Width)

// After
vp.SetWidth(40)
vp.SetHeight(80)
fmt.Println("%d is my favorite width", vp.Width())
  • New() doesn’t have deafult args anymore: New(width, height int) is now New(...Option). To set an initial width and height do one of the following:
// Use functional arguments:
vp := viewport.New(viewport.WithWidth(40), viewport.WithHeight(80)

// Or just:
vp := viewport.New()
vp.SetWidth(40)
vp.SetHeight(80)

Changelog

New Contributors

Full Changelog: charmbracelet/bubbles@v2.0.0-alpha.1...v2.0.0-alpha.2

💝 That’s a wrap!

Feel free to reach out, ask questions, give feedback, and let us know how it's going. We’d love to know what you think.


Part of Charm.

The Charm logo

Charm热爱开源 • Charm loves open source • نحنُ نحب المصادر المفتوحة


Configuration

📅 Schedule: Branch creation - Every minute ( * */1 * * * ) (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled because a matching PR was automerged previously.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@codecov
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.55%. Comparing base (b61cfe2) to head (dce279a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #463   +/-   ##
=======================================
  Coverage   71.55%   71.55%           
=======================================
  Files          67       67           
  Lines        3537     3537           
=======================================
  Hits         2531     2531           
  Misses        863      863           
  Partials      143      143           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@renovate renovate bot force-pushed the renovate/major-2-charmbracelet branch 10 times, most recently from 1cb4024 to f7ef7a9 Compare October 21, 2025 05:51
@renovate renovate bot force-pushed the renovate/major-2-charmbracelet branch 9 times, most recently from 5bf1826 to 480a29b Compare October 30, 2025 13:03
@renovate renovate bot force-pushed the renovate/major-2-charmbracelet branch 9 times, most recently from 1da93e9 to d4dc930 Compare November 6, 2025 22:59
@renovate renovate bot force-pushed the renovate/major-2-charmbracelet branch 10 times, most recently from d2c616f to d2cfb68 Compare November 14, 2025 05:48
@renovate renovate bot force-pushed the renovate/major-2-charmbracelet branch 6 times, most recently from dce279a to 5cdacc1 Compare November 18, 2025 03:10
@renovate
Copy link
Contributor Author

renovate bot commented Nov 18, 2025

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: go.sum
Command failed: go get -t ./...
go: github.com/charmbracelet/bubbles/[email protected]: parsing go.mod:
	module declares its path as: charm.land/bubbles/v2
	        but was required as: github.com/charmbracelet/bubbles/v2

@renovate renovate bot force-pushed the renovate/major-2-charmbracelet branch 4 times, most recently from 2b0cc24 to f91dd1d Compare November 20, 2025 01:39
@renovate renovate bot force-pushed the renovate/major-2-charmbracelet branch from f91dd1d to 6eea227 Compare November 20, 2025 21:36
@jippi jippi closed this Nov 20, 2025
@renovate
Copy link
Contributor Author

renovate bot commented Nov 20, 2025

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 2.x releases. But if you manually upgrade to 2.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/major-2-charmbracelet branch November 20, 2025 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants