BloksOrganismParallax Cards

Parallax Cards

Description

The Parallax Cards component is designed to create a visually appealing section with a series of cards that have a parallax effect. It allows for flexible alignment options, making it suitable for various layout designs. This component is particularly useful for showcasing content in an engaging, scrollable format.

Installation

bash
sabaccui add parallaxCards

Usage

Here are examples of how to use the Parallax Cards component in a Storyblok block:

Preview

Card 1

This is the content for Card 1

Sample image

Schema

Field NameTypeDescriptionDefault Value
cardsbloksAn array of card components to be displayed. Only allows card components.-
alignoptionDetermines the alignment of the cards. Options: left, right, alternate-l, alternate-rleft

Notes

  1. The component uses a ParallaxCard subcomponent to render individual cards.
  2. The align function determines the alignment of each card based on the selected alignment option and the card's index.
  3. Cards are rendered with a vertical spacing of 32 units between them.

Best Practices:

  • Use a consistent number of cards for each alignment option to maintain visual balance.
  • Ensure that the content within each card is concise and visually appealing to maximize the impact of the parallax effect.
  • Consider the overall page layout when choosing the alignment option to ensure it complements other page elements.
  • Test the component on various screen sizes to ensure the parallax effect and alignment work well across devices.