Angled Slider

An infinite marquee of angled image cards - hover to pause and straighten. Pass items or use the bundled demos. Built with motion.

Default

Cards rest at a 3D angle and scroll in a seamless loop. Hover pauses the marquee and snaps the card flat.

Loading…

Installation

CLI
npx @sonojs/ui@latest add angled-slider
Also needsnpm i motion

Usage

Demo images install under components/carousels/angled-slider/images/ and are imported by the defaults. Pass your own items when you replace them.

page.tsx
"use client"

import { AngledSlider } from "@/components/carousels/angled-slider"

export default function Page() {
  return <AngledSlider speed={30} className="w-full" />
}

Props

PropTypeDefaultDescription
itemsAngledSliderItem[]bundled imagesCards with `id`, `url`, optional `title` / `alt`. Defaults to static imports from `./images/`.
speednumber40Seconds for one full loop (higher = slower).
direction"left" · "right""left"Marquee scroll direction.
containerHeightstring"400px"Stage height CSS length.
cardWidthstring"300px"Card width CSS length.
gapstring"40px"Gap between cards.
anglenumber20Resting rotateY in degrees.
hoverScalenumber1.05Scale while a card is hovered.
classNamestring-Extra classes on the stage.