wolfadex/elm-ansi/1.1.0

NOTE: the latest version is 3.0.1

Ansi.Box

type alias Box =
{ topLeft : String
, top : String
, topRight : String
, right : String
, bottomRight : String
, bottom : String
, bottomLeft : String
, left : String
}
single : Box

A thin box with sharp corners

┌────┐
│    │
└────┘
double : Box

2 thin, nested boxes with sharp corners

╔════╗
║    ║
╚════╝

A box with sharp corners, thin on the top and bottom and doubled up on the sides

╓────╖
║    ║
╙────╜

A box with sharp corners, thin on the sides and doubled on top and bottom

╒════╕
│    │
╘════╛
bold : Box

A thick box with sharp corners

┏━━━━┓
┃    ┃
┗━━━━┛
classic : Box

A thin box with plus shaped corners

+----+
|    |
+----+
rounded : Box

A thin box with rounded corners

╭────╮
│    │
╰────╯
{ topLeft : Char
, top : Char
, topRight : Char
, right : Char
, bottomRight : Char
, bottom : Char
, bottomLeft : Char
, left : Char
}
-> Box

Design your own box, such as

•————•
∫    ∫
•————•

This can break layout when you use Chars that have a width greater than 1. E.g. 🌈 is 2 columns wide.

{ width : Int
, height : Int
}
-> Box
-> String

Helps to draw the box for you