Spux
Spux is a handcrafted and opinionated library of minimal loaders for Leptos.
Preview
Preview available at the GitHub page
Getting started
First install Leptos from leptos.dev
Then start a new Leptos project with either of the following commands:
Axum: cargo leptos new --git https://github.com/leptos-rs/start-axum
Actix Web: cargo leptos new --git https://github.com/leptos-rs/start-actix
Lastly install and add Spux at the root of the new project
cargo add spux
Once Spux is installed, include the pulser or spinner that you want to use
use *;
use Circle;
Each Spux component takes in required props for both color (#hex) and size (by px).
| Prop | Type |
|---|---|
| color | &str |
| size | u32 |
use *;
use Diamond;
Spux components can also be used with Suspense in Leptos.
use *;
use FilledSquare;
Spux loaders are separated into spinners and pulsers. v0.1.0 comes packed with:
spinners::
SquareTriangleFilledSquarePartialCircle
pulsers::
CircleDiamondFilledCircleFilledDiamond
To use the various spinners and pulsers, enable them via features in your Cargo.toml:
[]
= { = "0.1.0", = ["spinners", "pulsers"] }