Components / Rating

Rating

Stars for a score, to read or to give with the pointer and the keyboard.

Example

The component itself, running in WebAssembly, beside its code in a playground. Try it.

Code

use ravenrs::prelude::*;

fn rating() -> impl View {
    let score = State::new(3u32);
    VStack::new((
        Rating::new(score.binding()).label("Photo rating").clearable(),
        Rating::read_only(4).size(14.0),
    ))
    .spacing(12.0)
}

Open in the playground, with every example →

Full API of Rating →