Component usage
Add a fixed banner to your home page:Variables
Destination URL when the banner is clicked
Main banner image URL for desktop display
Alternative text for the image (for accessibility). Defaults to
"fixed banner" if not providedOptional mobile-optimized image URL displayed on screens smaller than 768px
Sorting number for component placement on the page (starts from zero)
Example
Recommended image sizes
- Desktop image: 1200×300 pixels
- Mobile image: 768×400 pixels
Using the
picture element with separate mobile and desktop images ensures optimal display and file size for each device.Image optimization
The component includes:loading="lazy"- Defers loading until the image is near viewportfetchpriority="high"- Prioritizes loading for above-fold bannersobject-fit: contain- Ensures full image visibility without cropping- Responsive width with
max-width:100%for all screen sizes
Configuration in twilight.json
This component is registered intwilight.json under features: