Fusuma

Components / Layout

class

view, in style class class (0 is the default look).

How it looks

Drawn by the toolkit from the example below. No page of the gallery uses class yet, so there is nothing to run.

class drawn by Fusuma

view, in style class class (0 is the default look).

A design system maps a class number to a look (a card variant, a danger button), so a widget is restyled by name without changing the widget.

Signature

pub const fn class<V>(class: u8, view: V) -> Classed<V>

Example

use fusuma::{button, class};
let view = class(2, button("Delete"));
let built = fusuma::doc::built::<(), _>(&view);
assert_eq!(built.texts(), ["Delete"]);

All components · Source