ModularM
Modular2y ago
4 replies
toasty

Mog: Style definitions for nice terminal layouts (inspired by charmbracelet/lipgloss)

Mog

https://github.com/thatstoasty/mog/tree/main

Style definitions for nice terminal layouts. Built with TUIs in mind. Ported from/Inspired by: https://github.com/charmbracelet/lipgloss/tree/master

Mog takes an expressive, declarative approach to terminal rendering. Users familiar with CSS will feel at home with Mog.

import mog

fn main():
  var style = mog.new_style() \
      .bold(True) \
      .foreground(mog.Color("#FAFAFA")) \
      .background(mog.Color("#7D56F4")) \
      .padding_top(2) \
      .padding_left(4) \
      .width(22)
  
  print(style.render("Hello, Mojo"))
Was this page helpful?