| Crates.io | lacquer |
| lib.rs | lacquer |
| version | 0.1.1 |
| created_at | 2025-12-14 18:15:10.348338+00 |
| updated_at | 2025-12-14 18:23:34.807988+00 |
| description | Style definitions for gorgeous terminal layouts ๐ |
| homepage | https://molten.dev |
| repository | https://github.com/moltenlabs/lacquer |
| max_upload_size | |
| id | 1984868 |
| size | 51,815 |
Style definitions for gorgeous terminal layouts in Rust.
Features โข Installation โข Quick Start โข Documentation โข Ecosystem
Lacquer is the Rust equivalent of lipgloss from Charmbracelet. It provides declarative style definitions for building beautiful terminal layoutsโwith padding, margins, borders, colors, and alignment.
use lacquer::{Style, Border, Position, Color};
let style = Style::new()
.padding(1, 2)
.margin(1, 0)
.border(Border::Rounded)
.border_foreground(Color::from_hex("#7C3AED"))
.foreground(Color::from_hex("#FAFAFA"))
.bold()
.align(Position::Center);
println!("{}", style.render("๐ฅ Molten Labs"));
โญโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ ๐ฅ Molten Labs โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโฏ
๐ฆ Box Model
|
๐จ Colors & Styling
|
๐ฒ Borders
|
๐ Layout & Alignment
|
cargo add lacquer
Or add to your Cargo.toml:
[dependencies]
lacquer = "0.1"
use lacquer::{Style, Color};
// Simple colored text
let styled = Style::new()
.foreground(Color::from_hex("#F97316"))
.bold()
.render("Hello, Lacquer!");
println!("{}", styled);
use lacquer::{Style, Border};
let box_style = Style::new()
.padding(1, 3) // 1 vertical, 3 horizontal
.border(Border::Rounded)
.render("Content");
println!("{}", box_style);
// โญโโโโโโโโโโโโโโฎ
// โ โ
// โ Content โ
// โ โ
// โฐโโโโโโโโโโโโโโฏ
use lacquer::{Style, Border, Position};
let centered = Style::new()
.width(30)
.border(Border::Double)
.align(Position::Center)
.render("Centered!");
println!("{}", centered);
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
// โ Centered! โ
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
use lacquer::{Style, Border, Color};
let content = "Line 1\nLine 2\nLine 3";
let multiline = Style::new()
.padding(1, 2)
.border(Border::Thick)
.foreground(Color::Green)
.render(content);
println!("{}", multiline);
use lacquer::Border;
Border::None // No border
Border::Normal // โโโโ โ โโโโ
Border::Rounded // โญโโโฎ โ โฐโโโฏ
Border::Thick // โโโโ โ โโโโ
Border::Double // โโโโ โ โโโโ
Border::Ascii // +--+ | +--+
Border::Block // โโโโ โ โโโโ
Border::Dashed // โโโโ โ โโโโ
use lacquer::{Border, BorderStyle};
let custom = Border::Custom(BorderStyle::new(
'โญ', 'โ', 'โฎ', // top-left, top, top-right
'โ', // right
'โฏ', 'โ', 'โฐ', // bottom-right, bottom, bottom-left
'โ', // left
));
For styling without block rendering (no borders, no padding):
use lacquer::{Style, Color};
let inline = Style::new()
.foreground(Color::Red)
.bold()
.inline()
.render("Error!");
println!("Status: {}", inline);
// Status: Error! (styled red and bold)
Enable the brand feature for pre-defined colors:
[dependencies]
lacquer = { version = "0.1", features = ["brand"] }
use lacquer::{Style, Border};
use molten_brand::{colors, products};
let goblin_box = Style::new()
.border(Border::Rounded)
.border_foreground(products::lair::PRIMARY.into())
.foreground(colors::text::PRIMARY.into())
.render("Lair Terminal");
In the forge, lacquer is the hard, protective finish applied to metalworkโtransforming raw iron into polished, beautiful artifacts. This library does the same for your terminal output. ๐
Lacquer is part of the Molten Labs open source ecosystem:
| Crate | Description | Status |
|---|---|---|
| molten_brand | Design tokens & colors | โ Published |
| glyphs | ANSI escape sequences | โ Published |
| lacquer | Terminal styling (you are here) | โ Published |
| cauldron | TUI framework (like bubbletea) | ๐ Planned |
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
git clone https://github.com/moltenlabs/lacquer
cd lacquer
cargo test
Licensed under either of:
at your option.
Built with ๐ by Molten Labs
"Let them cook."