Fusuma

Components / Components

stat_card

A number with its name and, under it, how it changed (a tag in the tone of the change).

Try it

This is the Account page of the gallery, running in your browser: stat_card is on it, and it is the real widget. Press Run, then use it.

Live: Account, where stat_card is usedOpen full size

Also on this pagebadgeavatarstepperrow

A number with its name and, under it, how it changed (a tag in the tone of the change).

Signature

pub fn stat_card<'a, M: Clone + 'a>( label: &'a str, value: &'a str, change: &'a str, tone: Tone, ) -> impl View<M> + 'a

Example

use fusuma::{Tone, stat_card};
let view = stat_card("Steps today", "8,412", "+12%", Tone::Success);
let built = fusuma::doc::built::<(), _>(&view);
assert_eq!(built.texts(), ["Steps today", "8,412", "+12%"]);

All components · Source