Packages
Multi-surface application runtime for Elixir. One TEA module renders to terminal, browser (LiveView), SSH, and MCP (agents). 30+ widgets, flexbox + CSS grid, AI agent runtime, distributed swarm with CRDTs, time-travel debugging, session recording, sandboxed REPL, and agentic commerce.
Current section
Files
Jump to
Current section
Files
lib/raxol/style/borders.ex
defmodule Raxol.Style.Borders do
@moduledoc """
Defines border properties for terminal UI elements.
"""
alias Raxol.Style.Colors.Color
@type t :: %__MODULE__{
style: :none | :solid | :double | :dashed | :dotted,
width: integer(),
color: Color.t(),
radius: integer()
}
defstruct style: :none,
width: 0,
color: nil,
radius: 0
@doc """
Creates a new border with default values.
"""
def new do
%__MODULE__{}
end
@doc """
Creates a new border with the specified values.
"""
def new(attrs) when is_map(attrs) do
struct(__MODULE__, attrs)
end
@doc """
Merges two border structs, with the second overriding the first.
"""
def merge(base, override) when is_map(base) and is_map(override) do
Map.merge(base, override)
end
end