Skip to main content

Slider Container & Slider Image

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

Face

Image caption

Cup

Image caption

Chair

Image caption

Slider Container Layout and Style Options

Background Color

Face

Background Color: Default (white)

Cup

Background Color: Default (white)

Chair

Background Color: Default (white)

Face

Background Color: Muted (light gray)

Cup

Background Color: Muted (light gray)

Chair

Background Color: Muted (light gray)

Face

Background Color: Primary (red)

Cup

Background Color: Primary (red)

Chair

Background Color: Primary (red)

Face

Background Color: Secondary (teal)

Cup

Background Color: Secondary (teal)

Chair

Background Color: Secondary (teal)

Face

Background Color: Tertiary (dark gray)

Cup

Background Color: Tertiary (dark gray)

Chair

Background Color: Tertiary (dark gray)

Padding

Face

Padding top and bottom of section: None

Cup

Padding top and bottom of section: None

Chair

Padding top and bottom of section: None

Face

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

Face

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

Face

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

Face

Bottom Margin: None

Cup

Bottom Margin: None

Chair

Bottom Margin: None

Face

Bottom Margin: X-Small

Cup

Bottom Margin: X-Small

Chair

Bottom Margin: X-Small

Face

Bottom Margin: Small

Cup

Bottom Margin: Small

Chair

Bottom Margin: Small

Face

Bottom Margin: Medium

Cup

Bottom Margin: Medium

Chair

Bottom Margin: Medium

Face

Bottom Margin: Large

Cup

Bottom Margin: Large

Chair

Bottom Margin: Large

Face

Bottom Margin: X-Large

Cup

Bottom Margin: X-Large

Chair

Bottom Margin: X-Large

the end

Top Margin

Face

Top Margin: None

Cup

Top Margin: None

Chair

Top Margin: None

Face

Top Margin: X-Small

Cup

Top Margin: X-Small

Chair

Top Margin: X-Small

Face

Top Margin: Small

Cup

Top Margin: Small

Chair

Top Margin: Small

Face

Top Margin: Medium

Cup

Top Margin: Medium

Chair

Top Margin: Medium

Face

Top Margin: Large

Cup

Top Margin: Large

Chair

Top Margin: Large

Face

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.