Velora UI

Image Slider

Full-bleed image slider with crossfade-zoom, autoplay, dots, arrows and swipe.

  • 3.0 KB gzipped
  • Deps: motion/react
  • Reduced-motion safe
  • Base UI & Radix compatible
Open in v0
Mountain peaks rising above a sea of clouds

Installation

pnpm dlx shadcn@latest add https://velora.colorlib.com/r/image-slider.json

Adds components/velora/image-slider.tsx, installs motion.

Examples

Hero

A landing hero with a headline and call-to-action layered over an autoplaying slider.

Spring collection · 42 new listings

Homes built around the light

Architect-designed houses with open plans, big glass and quiet gardens, ready to move into this season.

Props

PropTypeDefault
images*

Images to cycle through

SliderImage[]—
children

Content layered above the images (headline, call-to-action…)

React.ReactNode—
autoplay

Advance automatically (never starts on its own under reduced motion)

booleantrue
interval

ms each slide stays on screen while autoplaying

number5000
scrim

Darken the images so overlay text and controls stay legible

booleantrue
label

Accessible name for the carousel region

string"Image slider"

Also accepts every React.HTMLAttributes<HTMLElement> prop, forwarded to the root element.

SliderImage

interface SliderImage {
  /** Image URL */
  src: string;
  /** Alternative text ("" when the image is purely decorative) */
  alt: string;
}

Accessibility

Reduced motion
Autoplay never starts on its own and slides change instantly with no fade or zoom; pressing Play opts in to autoplay with instant changes.
Keyboard
Previous, next, pause/play and dot buttons are native buttons; Left/Right arrows (and Home/End) change slides while focus is inside the slider. Autoplay pauses while hovered or while focus is inside.
Screen readers
A region with aria-roledescription="carousel" whose current slide is a group labelled "n of N"; image alt text is read, and slide changes are announced politely only while autoplay is not running.