agnostic/platform/opentui
The OpenTUI platform for Lustre. This module provides a platform
configuration that targets @opentui/core for building terminal user
interfaces with Lustre’s MVU architecture.
Types
Values
pub const after_flush_phase: String
The phase name tagged by
opentui/effect.after_flush and
declared by the OpenTUI platform. Public so custom platforms can declare a
Phase with this exact name to run after_flush
effects.
pub const after_layout_phase: String
The phase name tagged by
opentui/effect.after_layout and
declared by the OpenTUI platform. Public so custom platforms can declare a
Phase with this exact name to run
after_layout effects.
pub fn auto_focus(config: Config, value: Bool) -> Config
Set whether to auto-focus the first focusable element.
pub fn default_config() -> Config
Create a default configuration for the OpenTUI renderer.
pub fn enable_mouse_movement(
config: Config,
value: Bool,
) -> Config
Set whether to enable mouse movement events.
pub fn exit_on_ctrl_c(config: Config, value: Bool) -> Config
Set whether Ctrl+C exits the application.
pub const frame_callbacks_phase: String
The phase name tagged by
opentui/effect.frame_callbacks
and declared by the OpenTUI platform. Public so custom platforms can
declare a Phase with this exact name to run
frame_callbacks effects.
pub fn max_fps(config: Config, value: Int) -> Config
Set the maximum frames per second. This paces on-demand frames — the one-shot renders triggered by state changes — capping how fast bursts of updates repaint.
pub fn max_stat_samples(config: Config, value: Int) -> Config
Set the maximum number of stat samples to keep.
pub fn open_console_on_error(
config: Config,
value: Bool,
) -> Config
Set whether to open console on error.
pub fn register_element(
config: Config,
tag: String,
factory: fn(Renderer) -> Node,
) -> Config
Register a custom element factory for a tag name. Once registered,
using element.element(tag, attrs, children) with this tag will create
a node via the factory instead of falling back to a box container.
Built-in tags (box, text, input, etc.) cannot be overridden — custom factories are only consulted when no built-in renderable matches.
pub fn target_fps(config: Config, value: Int) -> Config
Set the target frames per second. Rendering is on-demand: this paces the
continuous render loop, which only runs while OpenTUI animations are
active (requestAnimationFrame, timelines). It has no effect at idle or
on state-change renders — those are paced by max_fps.
pub fn use_alternate_screen(
config: Config,
value: Bool,
) -> Config
Set whether to use the alternate screen buffer.
pub fn use_kitty_keyboard(config: Config, value: Bool) -> Config
Set whether to use Kitty keyboard protocol.