Image

Image with a placeholder while it loads, a fallback when it fails, and aspect-ratio handling so your layout doesn’t jump when the picture arrives.

Preview

Installation

npx @lumioui/cli add image

Usage

import { Image } from "@/components/ui/image/image";
<Image />

Examples

Fallback

A photo in a group chat that didn't download.

Photo

The hero photo of a trail in a hiking app.

Rounded

A music app's "Pick up again" row, where each radius says what you're looking at.

API reference

Prop Type Default
rounded
"none" | "sm" +6 "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full"

Corner radius preset.

"md"
aspectRatio number

width / height ratio applied via style.

—
fallback React.ReactNode

Slot rendered when the image fails to load.

—
hidePlaceholder boolean

Hide the loading placeholder. Default false.

false
alt string

Alt text for the image — alias for accessibilityLabel. When neither is provided the label is left unset so the OS can decide what to announce.

—
className string —
style RNImageProps["style"] —