Skip to content

Component Image

MeowLynxSea edited this page Jun 18, 2026 · 5 revisions

Image

An image element with optional alt text.

use yororen_ui::headless::image::image;
use yororen_ui::renderer::ImageSource;

image("cover", ImageSource::Asset("covers/1.jpg".into()), cx)
    .alt("Cover")
    .render(cx)

Props

Method Purpose
alt(text) Alt text, surfaced as aria-label.

.render(cx) returns Stateful<Div>. The exact ImageSource variants depend on your renderer.

Clone this wiki locally