Style Gallery

View Source
  1. Box
  2. Compact
  3. Ledger
  4. Markdown
  5. Unicode Box

Box

Render tabular data with borders drawn from the ASCII character set. This should render everywhere.

To use, pass style: :box to Tablet.puts/2 or Tablet.render/2.

box screenshot

Compact

This style produces compact output by only underlining the header and adding whitespace around data. It is the default style.

compact screenshot

Ledger

Render tabular data as rows that alternate colors.

To use, pass style: :ledger to Tablet.puts/2 or Tablet.render/2.

ledger screenshot

Markdown

Render tabular data as a GitHub-flavored markdown table. Multi-line cells have their newlines replaced with <br> tags.

Pass style: :markdown to Tablet.puts/2 or Tablet.render/2 to use.

markdown screenshot

Unicode Box

Render tabular data with borders drawn with Unicode characters. This is a nicer take on the :box style.

To use, pass style: :unicode_box to Tablet.puts/2 or Tablet.render/2.

unicode_box screenshot