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
raxol lib raxol core component_utils.ex
Raw

lib/raxol/core/component_utils.ex

defmodule Raxol.Core.ComponentUtils do
@moduledoc """
Utility functions for component-related logic shared across Raxol modules.
"""
@doc """
Determines if a component is considered important (e.g., header, navigation, menu).
This is used for performance optimizations and gesture prioritization.
"""
@spec important_component?(String.t(), any()) :: boolean()
def important_component?(component_name, _state) do
String.contains?(component_name, "header") or
String.contains?(component_name, "navigation") or
String.contains?(component_name, "menu")
end
end