image

Image

Shows an image with a loading effect and a placeholder while it loads, and a fallback when it fails, such as a product shot.

Parts

PartFileDoes
ImageImage.vueShows an image with a loading state and a fallback if it fails to load.
ImageFallbackImageFallback.vueShows a placeholder in place of an image that failed to load.

Anatomy

<Image>
  <ImageFallback />
</Image>

Styling

All of Image’s styles live in image.json. New to styling in Frontic UI? How styling works →

Install

npm packages
@lucide/vue
class-variance-authority

API reference

Image.vue

Shows an image with a loading state and a fallback if it fails to load. Renders a <span>.

Props 7

PropTypeDefault
classClassValue—
srcstring—
altstring—
loadingEffectLoadingEffect'skeleton'
fallbackSrcstring—
placeholderSrcstring—
prioritybooleanfalse

Slots 1

SlotSlot props
fallback—

Recipe image 1 group

Recipe image-loading 2 groups

ImageFallback.vue
Image