121
GitHub
Data display

Image

Styles accessible images while preserving Astro, Next.js, and browser-native optimization.

FrameworksAstro · React · Elements

Registry commandlumen add Image

InteractionNative markup

01

See it in context

Preview

Lumen UI logo
02

Copy a working example

Usage

astro
---
import { Image } from '@santi020k/lumen-astro'
---

<Image
  alt="Lumen UI logo"
  height="80"
  invertOnDark
  layout="fixed"
  src="/logo.svg"
  width="318"
/>
---
import { Image } from '@santi020k/lumen-astro'
---

<Image
  alt="Lumen UI logo"
  height="80"
  invertOnDark
  layout="fixed"
  src="/logo.svg"
  width="318"
/>
03

Choose your target

Add this component

Choose the package for your runtime. All adapters share the Lumen stylesheet. Use the matching registry command when you want a local wrapper for that framework.

bash@santi020k/lumen-astro
pnpm add @santi020k/lumen-astro
pnpm add @santi020k/lumen-astro
bashAstro wrapper
lumen add Image
lumen add Image

API reference

Lumen-specific props and runtime attributes for the Astro primitive. React props follow the same names; Elements use equivalent kebab-case attributes where custom elements expose them.

AttributeValuesDefaultDescription
srcImageMetadata | stringrequiredUses astro:assets in Astro; React can pass a framework optimizer through as.
altstringrequiredProvides an accessible description; use an empty string for decorative images.
loading"lazy" | "eager""lazy"Defers off-screen image loading by default; use eager only for likely LCP images.
invertOnDarkbooleanfalseInverts monochrome artwork in dark themes while preserving colorful images by default.
asReact ElementType"img"React only: renders a compatible optimizer such as next/image while retaining Lumen classes.
class, classNamestring""Merges custom classes with the generated ui-* root classes.
...native attributesHTML attributes-Forwards standard attributes to the root element unless the component consumes them.