Skip to content

Rating

A whole number from 1 to N shown as stars.

Example

Stars

Show code
use zeyn::prelude::*;

pub fn overview(_ctx: &Ctx) -> Node {
    Form::of(Feedback {
        stars: Some(4),
        effort: None,
    })
    .field(Feedback::stars)
    .control(Feedback::stars, Control::Rating)
    .submit("Send", send_feedback)
    .on_success(|_, ui| ui.toast("Thanks. Nothing was stored."))
    .into()
}