Positioning root
RequiredAbsolute full-bleed media container.
divTheme & media
A decorative, theme-aware hero background with coordinated overlays, fades, and optional light blending.
ThemedHeroImageThemedHeroImagePropsConfigure the production component, inspect it at responsive widths, copy synchronized JSX, and share the exact state from one workspace.
Theme-aware media
Overlay and fade controls protect foreground contrast in both themes.
This JSX stays synchronized with the controls and uses only public package APIs.
import { ThemedHeroImage } from '@ai-created/ui';
export function Example() {
return (
<section className="relative min-h-96 overflow-hidden">
<ThemedHeroImage
darkSrc="/hero-dark.jpg"
lightSrc="/hero-light.jpg"
/>
<h1 className="relative z-10">Build with confidence</h1>
</section>
);
}
import { ThemedHeroImage } from '@ai-created/ui';Replace the version placeholder with the release tag your product has reviewed.
npm install --install-links "git+https://github.com/TheMarco/ai-created-ui.git#vX.Y.Z"@import '@ai-created/ui/styles/tokens.css';
@tailwind base;
@tailwind components;
@tailwind utilities;module.exports = {
presets: [require('@ai-created/ui/tailwind-preset')],
content: [
'./src/**/*.{js,ts,jsx,tsx,mdx}',
'./node_modules/@ai-created/ui/src/**/*.{js,ts,jsx,tsx}',
],
};Named regions define what belongs to the component, what remains optional, and where semantic responsibility lives.
Absolute full-bleed media container.
divRequired default decorative image.
Optional cross-faded light-theme image.
Theme-aware contrast layer.
Optional gradients blending into page background.
The Figma-equivalent asset model, auto-layout, resizing, properties, slots, content bounds, localization, and governance contract.
Asset kind
component
Design library name
Components/Media/Themed hero image
Maturity
stable
Last reviewed
2026-08-29
Canvas applicability
Publish a frame-filling media component with dark and light image swaps and overlay variants.
| Property | Type | Default | Code mapping | Options or notes |
|---|---|---|---|---|
| Dark imageRequired | instance-swap | None | darkSrc | No additional constraint |
| Light image | instance-swap | None | lightSrc | No additional constraint |
| Overlay | variant | default | overlay | default, strong, soft, none |
| Top fade | boolean | false | fadeTop | No additional constraint |
| Bottom fade | boolean | false | fadeBottom | No additional constraint |
| Light blend | boolean | false | blendLight | No additional constraint |
| Focal point | text | center | objectPosition | No additional constraint |
Required decorative image.
darkSrcOptional light-theme image.
lightSrcTheme token overlay treatment.
Internal overlay layerTop and bottom content-legibility fades.
Internal fade layersOverflow: Use a semantic image component for meaningful content.
The implementation always uses empty alt text.
Overflow: Create responsive optimized assets.
Hero media has high performance impact.
Absolute fill with object-cover.
Use sizes to describe actual layout breakpoints
Accountable owner
Design systems media foundations owner
Canonical source: src/components/ThemedHeroImage.tsx
These measurements and semantic tokens define the supported visual contract. Local overrides should preserve the same hierarchy and interaction cues.
Bounds
absolute inset 0
Image fit
cover
Theme cross-fade
500ms during theme transitions
Fade depth
one third of container height
Default quality
85
--hero-overlay-default / strong / softTheme-specific contrast overlays.
--hero-image-dark-opacity / --hero-image-light-opacityTheme image swap.
--color-bgTop and bottom fade destination.
--motion-slowTheme cross-fade.
A component is not complete until its passive, interactive, disabled, and exceptional states remain understandable in both themes.
Semantics, accessible naming, keyboard behavior, focus and announcements are implementation requirements, not optional documentation.
No component-specific keyboard behavior. Native document behavior remains unchanged.
Use the public package API and preserve the controlled-state, native-attribute, and ref contracts described below.
import { ThemedHeroImage } from '@ai-created/ui';Server Component compatible
<ThemedHeroImage darkSrc="/hero-dark.jpg" lightSrc="/hero-light.jpg" fadeBottom />These props and helpers are compatibility contracts. Changes require migration guidance and release notes.
| Prop | Type | Default | Contract |
|---|---|---|---|
| darkSrc | string | required | Dark-theme image source. |
| lightSrc | string | undefined | Optional light-theme source. |
| overlay | default | strong | soft | none | default | Overlay treatment. |
| priority | boolean | false | Next Image priority loading. |
| quality | number | 85 | Image quality. |
| sizes | string | 100vw | Responsive image sizes. |
| objectPosition | string | undefined | Image object position. |
| fadeTop | boolean | false | Top fade. |
| fadeBottom | boolean | false | Bottom fade. |
| blendLight | boolean | false | Light-theme blend. |
These rules keep the component recognizable across products without preventing deliberate composition.
The component should be verified as rendered UI, an interaction model, an accessibility surface, and a theme-aware visual artifact.