The Post Slider component supports displaying Card components in an interactive slider.
Examples of the People Card components:
The following example shows the full HTML structure of the Post Slider component:
<div class="bt1d-post-slider">
<div class="bt1d-post-slider__inner">
<div class="splide">
<div class="bt1d-post-slider__controls">
<div class="bt1d-post-slider__navigation splide__arrows">
<button aria-label="Previous" type="button" class="post-slider__navigation-button post-slider__navigation-button--previous splide__arrow splide__arrow--prev"></button>
<button aria-label="Next" type="button" class="post-slider__navigation-button post-slider__navigation-button--next splide__arrow splide__arrow--next"></button>
</div>
</div>
<div class="splide__track">
<div class="bt1d-post-slider__inner-container splide__list">
<div class="splide__slide"><!-- Slide content here. --></div>
<div class="splide__slide"><!-- Slide content here. --></div>
<div class="splide__slide"><!-- Slide content here. --></div>
<div class="splide__slide"><!-- Slide content here. --></div>
<div class="splide__slide"><!-- Slide content here. --></div>
</div>
</div>
</div>
</div>
</div>
Key Classes:
The component uses a combination of BT1D classes for styling and Splide classes to handle interactivity using the Splide library.
splide The element to be used for the Splide slider.splide__arrows The container for the Splide navigation arrows.splide__arrow The class for the next and previous arrow buttons.
splide__arrow--prev A modifier class to indicate the previous button.splide__arrow--next A modifier class to indicate the next button.splide__track The wrapper for the main Splide slider content.splide__list The container for the individual Splide slides.splide__slide An individual Splide slide. Each Card added to the slide should be placed inside this element.bt1d-post-slider: The main wrapper for the Post Slider component.bt1d-post-slider__inner: An inner wrapper that contains the markup for the slider.bt1d-post-slider__controls A wrapper for the slider controls.bt1d-post-slider__navigation A wrapper for the navigation buttons to be applied to the same element used for the Splide arrows,bt1d-post-slider__navigation-button The class next and previous buttons to be applied to the same elements used for the Splide arrow buttons.
bt1d-post-slider__navigation-button--prev A modifier class to indicate the previous button.bt1d-post-slider__navigation-button--next A modifier class to indicate the next button.bt1d-post-slider__inner-container The container for the individual Splide slides to be applied to the same element as the Splide list.If you’re stuck or need assistance, don’t hesitate to reach out to our support team for guidance.