// 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 {
Interactive playgroundConfigure Image
Change any prop and inspect the server-rendered component immediately.
Live examplesDesigned for real product surfaces
Compare configurations and resize the browser to check responsive behavior.
<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"
/>
<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"
/>
<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 APIProps and configuration
All content and behavior shown above is supplied through these props and slots.
| Prop | Type | Default | Required |
|---|
size | string | "default" | No |
color | string | "primary" | No |
src | string | "" | No |
alt | string | "" | No |
width | string | "" | No |
height | string | "" | No |
loading | string | "lazy" | No |
rounded | boolean | false | No |
class | string | "" | No |
}
}