Skip to Content
ComponentsImage

Image

Image wrapper with a loader placeholder. The placeholder is shown until the image fires a load event. data-loaded is set after successful load; data-position is set on the wrapper.

Preview

Usage

import { Image } from '@wire-ui/react' <Image src="/photo.jpg" alt="A photo" position="center" className="rounded" onImageLoaded={() => console.log('loaded')} />

Props

PropTypeDefaultDescription
srcstringrequiredImage source URL
altstringrequiredAlt text
positionHorizontalPositionSets data-position on wrapper
onImageLoaded() => voidCalled when image loads successfully
classNamestringApplied to the wrapper element

Data attributes

AttributeElementWhen present
data-positionWrapperposition prop is set
data-loaded<img>After successful load event
Last updated on

MIT License © 2026 wire-ui