github charmbracelet/lipgloss v2.0.0-beta.2

latest release: v2.0.0-beta.3
pre-release2 months ago

So Hot Right Now: Lip Gloss v2 Beta 2

This release builds on top of the last beta 1 release. It includes a new API for compositing layers and views, table enhancements, and a bunch of bug fixes. Let's get into it!

Compositing

layers

The big news in this release is compositing. Here's what it looks like:

box := lipgloss.NewStyle().
    Width(10).
    Height(5).
    Border(lipgloss.NormalBorder())

// Make some layers.
a := lipgloss.NewLayer(box.Render("Who wants marmalade?"))
b := lipgloss.NewLayer(box.Render("I do!"))

// Put layers in a canvas.
canvas := lipgloss.NewCanvas(
    a.X(5).Y(10).Z(1),
    b.X(3).Y(7)
)

// Render it all out.
lipgloss.Println(canvas.Render())

Also note that layers can also be nested (see Layer.AddLayers).
Otherwise, that’s all there is to it!

For more info see Layer, Canvas, and the compositing example.

Table Enhancements

Tables are one of the most beloved Charm components, and we've been working to
make them as polished as possible. In this release several bugs were fixed,
and many other rendering enhancements were made. You can check most of the fixes
on #526.

We're also refactoring the Bubbles' table component to use the Lip Gloss' table package, and making their APIs similar, as before they were relatively different. This means that if you use Tables via Bubbles in your Bubble Tea app, you'll be able to reap the benefits soon too!

Changelog

New Features

Bug fixes

Documentation updates

Other work

How’s it going?

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 • نحنُ نحب المصادر المفتوحة

Don't miss a new lipgloss release

NewReleases is sending notifications on new releases.