Skip to main content

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

statue

Image caption

cup

Image caption

chair

Image caption

Slider Container Layout and Style Options

Background Color

statue

Background Color: Default (white)

cup

Background Color: Default (white)

chair

Background Color: Default (white)

statue

Background Color: Muted (light gray)

cup

Background Color: Muted (light gray)

chair

Background Color: Muted (light gray)

statue

Background Color: Primary (red)

cup

Background Color: Primary (red)

chair

Background Color: Primary (red)

statue

Background Color: Secondary (teal)

cup

Background Color: Secondary (teal)

chair

Background Color: Secondary (teal)

statue

Background Color: Tertiary (dark gray)

cup

Background Color: Tertiary (dark gray)

chair

Background Color: Tertiary (dark gray)

Padding

statue

Padding top and bottom of section: None

cup

Padding top and bottom of section: None

chair

Padding top and bottom of section: None

statue

Padding top and bottom of section: Top and bottom

cup

Padding top and bottom of section: Top and bottom

chair

Padding top and bottom of section: Top and bottom

statue

Padding top and bottom of section: Top only

cup

Padding top and bottom of section: Top only

chair

Padding top and bottom of section: Top only

statue

Padding top and bottom of section: Bottom only

cup

Padding top and bottom of section: Bottom only

chair

Padding top and bottom of section: Bottom only

Bottom Margin

statue

Bottom Margin: None

cup

Bottom Margin: None

chair

Bottom Margin: None

statue

Bottom Margin: X-Small

cup

Bottom Margin: X-Small

chair

Bottom Margin: X-Small

statue

Bottom Margin: Small

cup

Bottom Margin: Small

chair

Bottom Margin: Small

statue

Bottom Margin: Medium

cup

Bottom Margin: Medium

chair

Bottom Margin: Medium

statue

Bottom Margin: Large

cup

Bottom Margin: Large

chair

Bottom Margin: Large

statue

Bottom Margin: X-Large

cup

Bottom Margin: X-Large

chair

Bottom Margin: X-Large

the end

Top Margin

statue

Top Margin: None

cup

Top Margin: None

chair

Top Margin: None

statue

Top Margin: X-Small

cup

Top Margin: X-Small

chair

Top Margin: X-Small

statue

Top Margin: Small

cup

Top Margin: Small

chair

Top Margin: Small

statue

Top Margin: Medium

cup

Top Margin: Medium

chair

Top Margin: Medium

statue

Top Margin: Large

cup

Top Margin: Large

chair

Top Margin: Large

statue

Top Margin: X-Large

cup

Top Margin: X-Large

chair

Top Margin: X-Large

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.