What problem does it solve?
Building rich terminal user interfaces in Kotlin can be error-prone and tedious when manual ANSI drawing and imperative updates are used. Mosaic provides a declarative runtime and a composable model to render terminal UIs reliably, with built-in state and effects management.
Core Features & Use Cases
- Declarative UI tree: Text, Row, Column, Box, Spacer, Filler, Static for structured, dynamic UIs.
- State and effects: remember, mutableStateOf, rememberCoroutineScope, LaunchedEffect, DisposableEffect for robust lifecycle management.
- Keyboard input and layout: LocalTerminal access and modifiers for interactive prompts, dashboards, and live tailers.
- Use cases: dashboards, progress renderers, live status displays, and CLI tools that need responsive UIs.
Quick Start
Create a Kotlin module, apply the Mosaic Gradle plugin, and run a simple dashboard using runMosaicBlocking to render the UI.