Getting StartedComponentsDesign TokensThemingTheme SynthesizerFrameworksAccessibilityUtilitiesServer RenderingBrowser SupportContributingChangelog App ShellAspect GridAuth ShellCenterClusterContainerDashboard GridDockFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbar Anchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkSpeed DialStepper NavTabsTop BarTree View AccordionAspect RatioAvatarAvatar GroupCalloutCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSeparatorSkeletonSpinnerStackVideoVirtual List Activity HeatmapAnimated NumberBadgeChartClockComparisonCountdown TimerData GridData TableDescription ListDiffEvent CalendarGaugeJSON TreeKanbanKey ValueLevel MeterListMeterSparklineStatStepperTableTagTimelineUptimeValue CardWaveform BlockquoteCode BlockGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriter ButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputOTP InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree Select AlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuGuided TourHover CardInline MessageLoading OverlayModalNotification PanelPopoverProgressProgress ToastSheetSnackbarSpotlightToastTooltip
ARC UI ARC Radiant Components
v3.2 Docs Components Tokens Synthesizer
Getting StartedFrameworksServer Rendering Design TokensThemingTheme SynthesizerTypographyUtilities All ComponentsAccessibilityBrowser SupportChangelogContributingStats App ShellAspect GridAuth ShellCenterClusterContainerDashboard GridDockFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbar Anchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkSpeed DialStepper NavTabsTop BarTree View AccordionAspect RatioAvatarAvatar GroupCalloutCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSeparatorSkeletonSpinnerStackVideoVirtual List Activity HeatmapAnimated NumberBadgeChartClockComparisonCountdown TimerData GridData TableDescription ListDiffEvent CalendarGaugeJSON TreeKanbanKey ValueLevel MeterListMeterSparklineStatStepperTableTagTimelineUptimeValue CardWaveform BlockquoteCode BlockGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriter ButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputOTP InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree Select AlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuGuided TourHover CardInline MessageLoading OverlayModalNotification PanelPopoverProgressProgress ToastSheetSnackbarSpotlightToastTooltip

Image

Enhanced image component with shimmer loading skeleton, smooth fade-in transition, error fallback, and aspect ratio presets.

Components Image
content interactive
<arc-image>

Overview

Image wraps the native `<img>` element with loading states and error handling that would otherwise require custom boilerplate in every project. While the image loads, a shimmer skeleton animation fills the container, giving users immediate visual feedback. Once loaded, the image fades in smoothly via a CSS opacity transition. If the image fails to load, the component switches to an error state that displays either a custom fallback image (via the `fallback` prop) or a default placeholder icon. This three-state lifecycle — loading, loaded, error — is fully automatic and requires no imperative code. Six aspect ratio presets (`1/1`, `4/3`, `16/9`, `21/9`, `3/4`, `9/16`) constrain the container dimensions before the image loads, preventing layout shift. The `fit` property maps directly to CSS `object-fit`, defaulting to `cover` for full-bleed cropping. Native lazy loading is enabled by default via the `loading="lazy"` attribute.

Guidelines

When to use

  • Always provide meaningful `alt` text for accessibility
  • Set an `aspect` ratio to prevent layout shift during loading
  • Use `fit="contain"` for logos or icons that should not be cropped
  • Provide a `fallback` image URL for critical images that must always display something

When not to use

  • Do not use arc-image for decorative background images — use CSS `background-image` instead
  • Do not set `loading="eager"` on below-the-fold images — lazy is the default for a reason
  • Do not omit `alt` text — the image is semantically meaningful content
  • Do not use extremely large source images without server-side resizing

Features

  • Shimmer skeleton animation during image loading
  • Smooth opacity fade-in transition when the image loads
  • Automatic error fallback with placeholder icon or custom fallback image
  • Six aspect ratio presets to prevent layout shift: 1/1, 4/3, 16/9, 21/9, 3/4, 9/16
  • Five object-fit modes: cover (default), contain, fill, none, scale-down
  • Native lazy loading enabled by default
  • Respects `prefers-reduced-motion` — disables shimmer and fade when set
  • Exposed CSS parts: wrapper, image, fallback

Preview

Usage

This component requires JavaScript. No pure HTML/CSS version is available — use the Web Component directly or a framework wrapper.

<arc-image
  src="https://picsum.photos/600/400"
  alt="Mountain landscape"
  aspect="16/9"
></arc-image>

<!-- With fallback -->
<arc-image
  src="https://example.com/missing.jpg"
  alt="Product photo"
  aspect="1/1"
  fallback="https://picsum.photos/200/200"
></arc-image>
import { Image } from '@arclux/arc-ui-react';

export default function Example() {
  return (
    <>
      <Image src="https://picsum.photos/600/400" alt="Mountain landscape" aspect="16/9" />
      <Image src="/missing.jpg" alt="Product" aspect="1/1" fallback="/placeholder.png" />
    </>
  );
}
<script setup>
import { Image } from '@arclux/arc-ui-vue';
</script>

<template>
  <Image src="https://picsum.photos/600/400" alt="Mountain landscape" aspect="16/9" />
  <Image src="/missing.jpg" alt="Product" aspect="1/1" fallback="/placeholder.png" />
</template>
<script>
  import { Image } from '@arclux/arc-ui-svelte';
</script>

<Image src="https://picsum.photos/600/400" alt="Mountain landscape" aspect="16/9" />
<Image src="/missing.jpg" alt="Product" aspect="1/1" fallback="/placeholder.png" />
import { Component } from '@angular/core';
import { Image } from '@arclux/arc-ui-angular';

@Component({
  imports: [Image],
  template: `
    <arc-image src="https://picsum.photos/600/400" alt="Mountain landscape" aspect="16/9" />
    <arc-image src="/missing.jpg" alt="Product" aspect="1/1" fallback="/placeholder.png" />
  `,
})
export class GalleryComponent {}
import { Image } from '@arclux/arc-ui-solid';

export default function Example() {
  return (
    <>
      <Image src="https://picsum.photos/600/400" alt="Mountain landscape" aspect="16/9" />
      <Image src="/missing.jpg" alt="Product" aspect="1/1" fallback="/placeholder.png" />
    </>
  );
}
import { Image } from '@arclux/arc-ui-preact';

export default function Example() {
  return (
    <>
      <Image src="https://picsum.photos/600/400" alt="Mountain landscape" aspect="16/9" />
      <Image src="/missing.jpg" alt="Product" aspect="1/1" fallback="/placeholder.png" />
    </>
  );
}

API

src string ''
Image source URL.
alt string ''
Alt text for the image. Used as the accessible description.
aspect '1/1' | '4/3' | '16/9' | '21/9' | '3/4' | '9/16' ''
Constrains the container to a fixed aspect ratio, preventing layout shift during loading.
fit 'cover' | 'contain' | 'fill' | 'none' | 'scale-down' 'cover'
CSS object-fit mode controlling how the image fills its container.
loading 'lazy' | 'eager' 'lazy'
Native loading strategy. Lazy defers off-screen images until they approach the viewport.
fallback string ''
URL of a fallback image to display if the primary `src` fails to load.

Events

arc-load
Fired when the image successfully loads.
arc-error
Fired when the image fails to load.

See Also