UPDATE June 26, 2026: This is a major refactor. Now includes vertical scrolling and almost everything is a prop.

Need to add this animation keyframe to the global CSS.

@keyframes slider-scroll-x {

  from {
    transform: translateX(var(--scroll-start));
  }
  to {
    transform: translateX(var(--scroll-end));
  }
}

@keyframes slider-scroll-y {
  from {
    transform: translateY(var(--scroll-start));
  }
  to {
    transform: translateY(var(--scroll-end));
  }
}

@media (prefers-reduced-motion: reduce) {

  .slider {

    overflow: visible;

    -webkit-mask-image: none;

    mask-image: none;

    & .slide-track {

      animation: none !important;

      will-change: auto;

      &[aria-hidden='true'] {

        display: none;

      }
    }
  }
}