The Slider Container and Slider Image components are designed to work seamlessly together, allowing you to create a simple image slider. The Slider Container acts as the outer structure, with options to customize the background color and control spacing (padding and margin) both above and below the slider. Inside the container, the Slider Image component takes an image and provides fields for adding alt text, an optional image caption, and, if desired, specifying the aspect ratio.
Example
Slider Container Layout and Style Options
Background Color
Padding
Bottom Margin
the end
Top Margin
the end
Usage
Do
- Ensure images are high quality and properly sized for the best presentation.
- Use the optional image caption when additional context or explanation is needed for the image.
- Adjust the aspect ratio to maintain consistency in how images are displayed across different slides.
- Test the slider on different devices to ensure it looks good and functions properly on both desktop and mobile screens.
- Keep the number of slides manageable to avoid overwhelming the user with too much content.
- Ensure that the slider content contributes meaningfully to the overall user experience and isn’t used purely for decoration.
Don't
- Don’t use images with low resolution, as they will appear pixelated or blurry.
- Avoid using too many slides, which can overwhelm users and decrease engagement.
- Refrain from using captions that are too long, as they can clutter the design and distract from the image.
- Avoid choosing a background color that makes text or images difficult to see or creates a jarring contrast.
- Don’t use excessively large image files, as they can slow down page loading times.
- Don’t rely on the slider for critical information that users need to see immediately, as some users may not interact with it.
Accessibility
- Ensure that you provide suitable alt text for images. Alt text for images enhances web accessibility by offering a textual description for screen readers used by visually impaired users. See the a11yproject website for more information about writing alt text for images.