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 examples demos integrated_accessibility_demo.ex
Raw

examples/demos/integrated_accessibility_demo.ex

defmodule Raxol.Examples.IntegratedAccessibilityDemo do
@moduledoc "Simplified version of the Integrated Accessibility Demo."
@behaviour Raxol.Core.Runtime.Application
defstruct message: "Hello from Simplified Demo"
@impl Raxol.Core.Runtime.Application
def init(_opts) do
{%__MODULE__{}, []}
end
@impl Raxol.Core.Runtime.Application
def update(_msg, state) do
{state, []}
end
@impl Raxol.Core.Runtime.Application
def handle_event(%Raxol.Core.Events.Event{} = event) do
case event.type do
:button_clicked ->
{:increment_clicks, nil}
:checkbox_toggled ->
{:toggle_checkbox, nil}
_ ->
nil
end
end
@impl Raxol.Core.Runtime.Application
def handle_message(_msg, state) do
{state, []}
end
@impl Raxol.Core.Runtime.Application
def handle_tick(_tick) do
[]
end
@impl Raxol.Core.Runtime.Application
def subscriptions(_state) do
[]
end
@impl Raxol.Core.Runtime.Application
def terminate(_reason, _state) do
:ok
end
@impl Raxol.Core.Runtime.Application
@dialyzer {:nowarn_function, view: 1}
def view(state) do
# Using direct map construction for label to avoid macro issues
%{type: :label, attrs: [content: state.message]}
end
end