wink
A simple Gleam box drawing library
gleam add wink
import gleam/io
import wink
pub fn main() {
// draws a box with the default configuration
"(>ᴗ•)"
|> wink.draw
|> io.println
}
will output:
╭───────╮
│ │
│ (>ᴗ•) │
│ │
╰───────╯
import gleam/io
import wink.{Border, Config, Custom}
pub fn main() {
// or you can initialize a custom-styled box with specific config
let box =
wink.init(
Config(
..wink.default_config,
style: Custom(Border(
top_right: "◝",
top_left: "◜",
bottom_right: "◞",
bottom_left: "◟",
horizontal: "―",
vertical: "⸾",
)),
),
)
"(>ᴗ•)"
|> box.draw
|> io.println
}
Further documentation can be found at https://hexdocs.pm/wink.
Development
gleam run # Run the project
gleam test # Run the tests
gleam shell # Run an Erlang shell