Raxol.UI.Renderer (Raxol v2.0.1)

View Source

UI Renderer for Raxol terminal applications.

This module provides rendering capabilities for various UI elements including panels, boxes, text, and tables with theme support.

Summary

Functions

Renders a UI element to a list of cells.

Renders a single element or list of elements to cells using the default theme.

Renders a single element or list of elements to cells. This is the main public API for the renderer.

Functions

render_element(element, theme, parent_style \\ %{})

Renders a UI element to a list of cells.

Parameters

  • element - The element to render
  • theme - The theme to use for rendering
  • parent_style - Parent style to inherit from (optional)

Returns

  • List of cells in the format {x, y, char, fg, bg, attrs}

render_to_cells(element_or_elements)

Renders a single element or list of elements to cells using the default theme.

Parameters

  • element_or_elements - Single element map, list of elements, or nil

Returns

  • List of cells in the format {x, y, char, fg, bg, attrs}

render_to_cells(element_or_elements, theme)

Renders a single element or list of elements to cells. This is the main public API for the renderer.

Parameters

  • element_or_elements - Single element map, list of elements, or nil
  • theme - Optional theme (defaults to default theme)

Returns

  • List of cells in the format {x, y, char, fg, bg, attrs}