Skip to main content

Crate scrin_widgets

Crate scrin_widgets 

Source
Expand description

§scrin-widgets

scrin-widgets is a plug-and-play Rust widget library for building Scrin-style TUIs with Ratatui. It ships animated Aisling effects, ambient glyph fields, glowing gauges, and signal panels that can be dropped into a normal Ratatui app.

§Install

From this repo:

[dependencies]
scrin-widgets = { path = "." }

Once published to crates.io:

[dependencies]
scrin-widgets = "0.1"

§Quick Use

use ratatui::{widgets::{Block, Paragraph, Widget}, Frame};
use scrin_widgets::{AislingExt, GlyphRain, NebulaGauge, SignalPanel};

fn draw(frame: &mut Frame, tick: u64) {
    let area = frame.area();

    frame.render_widget(
        Paragraph::new("any Ratatui widget can shimmer")
            .block(Block::bordered().title("Aisling"))
            .aisling()
            .tick(tick),
        area,
    );
}

§Included Widgets

Aisling<W> wraps any Ratatui Widget and applies animated shimmer, scanline, and edge-glow effects after the widget renders.

GlyphRain renders a deterministic matrix-like field for backgrounds and data streams.

NebulaGauge renders a glowing progress meter with a flowing fill.

SignalPanel renders a compact status panel with animated signal bars.

§Examples

Run a static preview:

cargo run --example basic

Run the animated showcase:

cargo run --example showcase

Press q or Esc to exit the animated showcase.

Re-exports§

pub use ratatui;

Modules§

prelude
Common imports for apps that want the Scrin widget set plus Ratatui.

Structs§

Aisling
Wraps any Ratatui widget with an Aisling post-render effect.
AislingEffect
A composable post-render effect that can be applied to any Ratatui buffer area.
AislingPalette
The default color system used by Aisling effects and bundled widgets.
GlyphRain
A deterministic matrix/rain field for ambient Scrin backgrounds.
NebulaGauge
A compact progress gauge with a flowing nebula fill.
SignalPanel
A bordered status panel with animated signal bars.

Traits§

AislingExt
Extension trait for calling .aisling() on any Ratatui widget.