// Generated by scripts/generate-showcase.mjs. Do not edit directly. page ImageDetail { layout = "showcase" state playground_size = ctx.url.searchParams.get("pg_size") ?? "default" state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary" state playground_src = ctx.url.searchParams.get("pg_src") ?? "" state playground_alt = ctx.url.searchParams.get("pg_alt") ?? "" state playground_width = ctx.url.searchParams.get("pg_width") ?? "" state playground_height = ctx.url.searchParams.get("pg_height") ?? "" state playground_loading = ctx.url.searchParams.get("pg_loading") ?? "lazy" state playground_rounded = (ctx.url.searchParams.get("pg_rounded") ?? "false") === "true" state playground_class = ctx.url.searchParams.get("pg_class") ?? "showcase-instance showcase-instance--1" seo { title = "Image" description = "Render a responsive image with explicit dimensions, loading behavior, alternative text, sizing, and rounded treatment." } view {
Layout component

Image

Render a responsive image with explicit dimensions, loading behavior, alternative text, sizing, and rounded treatment.

9 props1 slots0 outputsTheme readyResponsive
Interactive playground

Configure Image

Change any prop and inspect the server-rendered component immediately.

Live preview
{playground_alt}
Component code
<Image />
Component props9 controls
Live examples

Designed for real product surfaces

Compare configurations and resize the browser to check responsive behavior.

Recommended

Responsive content image

Render a responsive image with meaningful alternative text.

01
Live preview
Abstract violet circle on a dark surface
Component usage.wrn
<Image
  src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 450'%3E%3Crect width='800' height='450' fill='%231e1b4b'/%3E%3Ccircle cx='400' cy='225' r='120' fill='%237c3aed'/%3E%3C/svg%3E"
  alt="Abstract violet circle on a dark surface"
  width="800"
  height="450"
/>
Compact

Rounded thumbnail

Use a rounded image in cards, directories, and compact summaries.

02
Live preview
Abstract blue thumbnail
Component usage.wrn
<Image
  size="sm"
  src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Crect width='400' height='400' fill='%230284c7'/%3E%3Cpath d='M80 290 190 120l130 170z' fill='white' opacity='.7'/%3E%3C/svg%3E"
  alt="Abstract blue thumbnail"
  width="400"
  height="400"
  rounded="true"
/>
Advanced

Eager hero image

Use explicit dimensions and eager loading for an above-the-fold visual.

03
Live preview
Abstract green hero visual
Component usage.wrn
<Image
  size="lg"
  src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 600'%3E%3Crect width='1200' height='600' fill='%23059669'/%3E%3Crect x='150' y='120' width='900' height='360' rx='36' fill='white' opacity='.18'/%3E%3C/svg%3E"
  alt="Abstract green hero visual"
  width="1200"
  height="600"
  loading="eager"
  rounded="true"
/>
Component API

Props and configuration

All content and behavior shown above is supplied through these props and slots.

PropTypeDefaultRequired
sizestring"default"No
colorstring"primary"No
srcstring""No
altstring""No
widthstring""No
heightstring""No
loadingstring"lazy"No
roundedbooleanfalseNo
classstring""No
} }