soma-ui 0.1.1

A Leptos 0.8 component library: 160+ accessible UI components, blocks, charts, and a ChartDB-style schema diagram — with a prebuilt stylesheet.
Documentation
1
2
3
4
5
6
7
use leptos::prelude::*;

pub fn use_toggle(initial: bool) -> (Signal<bool>, Callback<()>) {
    let state = RwSignal::new(initial);
    let toggle = Callback::new(move |_: ()| state.update(|v| *v = !*v));
    (state.into(), toggle)
}