bloom is a layout, compositing, and animation engine for Bubble Tea programs. Describe your view as a tree of rows, columns, and layers, built from your model every frame, and bloom sizes it to the terminal, draws dialogs and toasts on top, animates what changes, and tells you what the mouse is over.
Warning
bloom is still pre-1.0. Its API may change drastically until the v1.0.0 release, so expect breaking changes between versions, and pin the version you use.
- βοΈ Layout without the math:
Row,Column,Grid, andWrap, withFixed,Fill,Grow,Percent, and natural-size slots,Min/Max, gaps, alignment, and justification. No more measuring rendered strings and subtracting borders on every resize. - βοΈ Responsive by priority: panels marked
Collapsibledrop out when the terminal is too small, lowest priority first, components can build a different layout for the space they're given, andMinSizeshows a "window too small" note in place of a layout that can't fit. - βοΈ Real layers:
Overlaydraws dialogs, dropdowns, popovers, and toasts over the screen, anchored to a corner or to another node, with backdrops, drop shadows, and modal input. - βοΈ Mouse handlers: clicks, double clicks, the wheel, hover, and drags go to handlers on the
nodes they belong to, like
bloom.Text(name).On(on.Click(m.open)). Hover styles and drag capture are built in. - βοΈ Focus: tab order from the layout, styles for the focused node, the real terminal cursor, and focus scopes that keep tab inside a dialog until it closes.
- βοΈ Tooltips:
Tooltip("Deploy")on any node, and text cut short with "β¦" unfolds in place under the pointer, with placement that hides the least of the screen, a status line sink, and keyboard access through focus and pinning. - βοΈ Animation kept in your model: eased and spring values, presences for showing and hiding
(with
ShowForfor toasts that hide themselves), sequences of steps, and automatic layout animation withAnimate(). - βοΈ 25+ cell effects:
Fade,Slide,Iris,Unfold,Decode,Glitch, and more as transitions;Dim,Desaturate,Recolor, andSpotlightas backdrops;Shake,Shimmer,Roll, andBurstfor feedback;Chase,Pulse,Comet, andMarchfor looping borders; and combinators to stagger, delay, reverse, and ease them. Or write your own. - βοΈ Borders that do more: put titles, clickable tabs, icon buttons, and counters on a box's
border with
Edge, plus draggable scrollbars that only show up when there's more to scroll. - βοΈ Viewports for a lot of text:
Viewportshows aBufferof lines, such as a log of a million, drawing only those in sight, with wrapping, following the end, line numbers, search marks, and selection. - βοΈ Loading placeholders:
Skeleton(8, 0, 5, 11)draws shimmering bars in place of content that's still loading, a line for each line of the content, so nothing jumps when it arrives. - βοΈ FIGlet text: package
figdraws big text in 67 bundled FIGlet and TOIlet fonts, laid out as C figlet does, with gradients and other paints, smaller fonts as space runs short, and letters animated one at a time with bloom's effects and layout animation. - βοΈ Works with existing components: anything with a
View() stringmethod, including Bubbles components, is a leaf in the tree. - βοΈ Fast: strings are parsed once, Lip Gloss renders are cached, and unchanged frames aren't composited again. A 200Γ60 dashboard animating a dialog over a dimmed backdrop takes about 0.45ms a frame.
Take a look at the official documentation for tutorials, guides, and reference, starting with building your first layout. The documentation is also available for LLMs and agents as llms.txt and llms-full.txt, and every page has a markdown version.
func (m *model) View() tea.View {
v := m.ui.View(m.width, m.height, bloom.Overlay(
bloom.Column(
bloom.Fill(bloom.Row(
bloom.Fixed(24, m.sidebar).Collapsible(1),
bloom.Fill(m.reader).Min(40),
)),
m.statusbar,
),
bloom.Layer(m.dialog).
Modal().
Backdrop(fx.Dim{Amount: 0.5}).
Presence(m.dialogAnim, fx.Fade{}, fx.Slide{From: bloom.Bottom}),
bloom.Layer(m.toast).
Anchor(bloom.End, bloom.End).
Presence(m.toastAnim, fx.Slide{From: bloom.Right}),
))
v.AltScreen = true
return v
}The model keeps a *bloom.Root from bloom.New(), returns m.ui.Init() from Init, and passes every message to
m.ui.Update. Build your first layout walks through a complete
program, and Add bloom to an existing program converts one you
already have.
Runnable programs, from a basic layout to a 120 FPS dashboard, are in _examples. Run one with
go run ./forms from that directory.
go get -u bloomfx.dev/bloom@latestbloom needs Go 1.27 or newer, Bubble Tea v2 (charm.land/bubbletea/v2),
and Lip Gloss v2 (charm.land/lipgloss/v2). It isn't built for
Bubble Tea v1; see Installation.
- bubbletint: hundreds of terminal color themes for Bubble Tea and Lip Gloss, which work directly in bloom's styles and effects.
- steep: a test harness that runs terminal programs, including Bubble Tea programs, in an emulated terminal, used for bloom's own end-to-end tests. Docs are at getsteep.dev.
- β€οΈ Please review the Code of Conduct for guidelines on ensuring everyone has the best experience interacting with the community.
- πββοΈ Take a look at the support document on guidelines for tips on how to ask the right questions.
- π For all features/bugs/issues/questions/etc, head over here.
- β€οΈ Please review the Code of Conduct for guidelines on ensuring everyone has the best experience interacting with the community.
- π Please review the contributing doc for submitting issues/a guide on submitting pull requests and helping out.
- ποΈ For anything security related, please review this repositories security policy.
MIT License
Copyright (c) 2026 Liam Stanley <liam@liam.sh>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Also located here
