# scrin-widgets
`scrin-widgets` is a plug-and-play Rust widget library for building Scrin-style TUIs with Scrin. It ships animated Aisling effects, ambient glyph fields, glowing gauges, and signal panels that can be dropped into a normal Scrin app.
## Install
From this repo:
```toml
[dependencies]
scrin-widgets = { path = "." }
```
Once published to crates.io:
```toml
[dependencies]
scrin-widgets = "0.1"
```
## Quick Use
```rust
use scrin::{widgets::{block::{Block, BorderStyle}, Paragraph, Widget}, Frame, Rect};
use scrin_widgets::AislingExt;
fn draw(frame: &mut Frame<'_>, tick: u64) {
let area = frame.area();
let block = Block::new("Aisling")
.with_borders(BorderStyle::Plain)
.with_inner_margin(Rect::ZERO);
let inner = block.inner(area);
let buffer = frame.buffer();
block.render(buffer, area);
Paragraph::new("any Scrin widget can shimmer")
.aisling()
.tick(tick)
.render(buffer, inner);
}
```
## Included Widgets
`Aisling<W>` wraps any Scrin `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:
```sh
cargo run --example basic
```
Run the animated showcase:
```sh
cargo run --example showcase
```
Press `q` or `Esc` to exit the animated showcase.