Alaja.Components.Separator (Alaja v1.0.0)

Copy Markdown View Source

Static horizontal separator line for terminal output.

Usage

iex> Alaja.Components.Separator.print()
# Prints ─────────────────────────────

iex> Alaja.Components.Separator.print("Section Title")
# Prints ─── Section Title ───────────

Summary

Functions

Prints a separator line directly to stdout.

Renders a separator to iodata without printing.

Functions

print(text \\ nil, opts \\ [])

@spec print(
  String.t() | nil,
  keyword()
) :: :ok

Prints a separator line directly to stdout.

Options

  • :char - Character to use (default: "─")
  • :text - Optional centered label
  • :color - RGB tuple (default: dark gray)
  • :width - Total width (default: 80)

render(text \\ nil, opts \\ [])

@spec render(
  String.t() | nil,
  keyword()
) :: iodata()

Renders a separator to iodata without printing.