Components / IconTile

IconTile

An icon in a square tinted with its color.

Example

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

Code

use ravenrs::prelude::*;

fn icon_tile() -> impl View {
    HStack::new((
        IconTile::new(IconName::CircleCheck).tone(Tone::Success),
        IconTile::new(IconName::TriangleAlert).tone(Tone::Warning),
        IconTile::new(IconName::Image).size(32.0),
    ))
    .spacing(12.0)
    .align(Align::Center)
}

Open in the playground, with every example →

Full API of IconTile →