Schema Overview
The hero sliders data is structured as an array of slide objects, each containing image sources, text content, and optional CTA configuration.Slide Object Fields
Unique identifier for the slideExample:
1URL or path to the desktop version of the hero image (recommended: 1920x1080)Example:
"https://picsum.photos/id/1/1920/1080"URL or path to the mobile version of the hero image (recommended: 1080x1920)Example:
"https://picsum.photos/id/1/1080/1920"Alternative text for the image (accessibility and SEO)Example:
"BoillerPlate"Small text displayed above the main headline (typically for category or context)Example:
"Astro Project Boillerplate"Main headline or title text for the slideExample:
"BoillerPlate V1"Descriptive text or subtitle displayed below the headlineExample:
"A simple and clean boilerplate for Astro"Label text for the call-to-action buttonExample:
"Call to action"URL or anchor link for the call-to-action buttonExample:
"#" or "/contact"Usage Notes
Image Specifications
- Desktop images: Recommended aspect ratio 16:9 (e.g., 1920x1080)
- Mobile images: Recommended aspect ratio 9:16 (e.g., 1080x1920)
- Images should be optimized for web performance
- Support for external URLs and local paths
Text Content
The text hierarchy for each slide:- Overline - Optional contextual text
- Headline - Main title (required)
- Byline - Supporting description
- CTA - Call-to-action button
Call-to-Action
BothctaLabel and ctaLink should be provided together. If you want to hide the CTA button, omit both fields or set them to empty strings.
Example JSON
Single Slide
Complete Array
Implementation
This schema is used by the hero slider component to render responsive carousel slides. The component automatically:- Switches between desktop and mobile images based on viewport
- Displays text content with proper hierarchy
- Renders CTA buttons when provided
- Handles slide navigation and transitions