fabulous

Package Version Hex Docs

gleam add fabulous@1
import fabulous

pub fn main() {
   fabulous.Table([], [], 8, "LEFT", "LEFT")
  |> fabulous.add_col("Column 1")
  |> fabulous.add_col("Column 2")
  |> fabulous.add_col("Column 4")
  |> fabulous.add_row(["Row 1", "Cell 2", "Cell 3",])
  |> fabulous.add_row(["This is", "soooo", "loooooooonnnnnngggggg"])
  |> fabulous.make_table()
}

Example output:


╭──────────┬──────────┬──────────╮
│ Column 1Column 2Column 4 │
├──────────┼──────────┼──────────┤
│ Row 1Cell 2Cell 3   │
│ ──────── │ ──────── │ ──────── │
│ This issoooolooooooo │
│          │          │ onnnnnng │
│          │          │ ggggg    │
│ ──────── │ ──────── │ ──────── │
╰──────────┴──────────┴──────────╯

Further documentation can be found at https://hexdocs.pm/fabulous.

Development

gleam run   # Run the project
Search Document