Skip to content
Velkin LogoVelkin Logo
Velkin
VELKIN/UI

Modern UI components for product teams and their AI agents. Lit core, typed wrappers, live MCP.

sales@velkinui.com

Product

  • Docs
  • Components
  • Studio
  • Pricing

Resources

  • Quick start
  • Blog
  • Changelog
  • Roadmap
  • Status

Project

  • About
  • Contact
  • License
  • Privacy
  • Terms

© 2026 Velkin. MIT core · Pro licenses available.

VELKIN

Carousel

A slide carousel component with navigation, drag, and autoplay.

vu-carousel · @velkin/react/carousel

Copy page

Import

React
npm i @velkin/react

import { VuCarousel } from "@velkin/react/carousel";

Examples

API

Tables match the member selected under Import.

Props

PropTypeDefaultDescription
indexnumber0Active slide index (zero-based). Reflected so consumers can drive it from outside via `index` attribute.
slidesPerViewnumber1How many slides are visible at once.
slidesToScrollnumber1How many slides advance per `next()` / `prev()` / dot click.
loopbooleanfalseWraps around at the end / start instead of stopping. When `false` (default), navigation stops at the edges and arrow buttons get `disabled`.
autoplaybooleanfalseAuto-rotates through slides. Off by default — auto-rotation is hostile UX without an explicit ask. Respects `prefers-reduced-motion: reduce` (treated as off).
intervalnumber5000Milliseconds between autoplay advances.
pauseOnHoverbooleantruePause autoplay while the pointer is over the carousel. Focus-within always pauses regardless of this flag (a11y requirement).
controlsVuCarouselControls"dots"Which navigation affordances render.
gapVuCarouselGap"none"Gap between slides.
orientationVuCarouselOrientation"horizontal"Layout axis. `vertical` requires a host `block-size` so the viewport has something to clip against.
labelstring""Accessible name for the carousel — required by the WAI-ARIA carousel pattern (the screen reader needs to know the *purpose* of the carousel).
prevLabelstring""Previous control name; empty uses the locale catalog.
nextLabelstring""Next control name; empty uses the locale catalog.
dotsLabelstring""Dot tablist name; empty uses the locale catalog.
loadingbooleanfalseShow a loading overlay (spinner + dimmed surface) and mark the host `aria-busy`.

Events

EventDetailDescription
vu-changeVuCarouselChangeDetailActive slide index changed (API, click, drag, keyboard, or autoplay).

Slots

SlotDescription
—- Default slot for `<vu-carousel-item>` slides. The parent relays slide ARIA (`role="group"`, roledescription, "N of M" / item `label`, `inert` / `aria-hidden` when offscreen).
prev-iconOptional override for the previous-arrow icon. Defaults to a chevron.
next-iconOptional override for the next-arrow icon. Defaults to a chevron.

CSS parts

PartDescription
baseOuter wrapper containing viewport and controls.
viewportThe clipping container; slides translate within this.
trackThe flex container that translates by `--carousel-index`.
prevThe previous-slide button.
nextThe next-slide button.
dotsThe container for dot indicators.
dotEach dot indicator (a real `<button>`).
dot-activeAdded to the active dot (for `::part(dot-active)` styling).
liveThe visually-hidden live region announcing the current slide.
loadingThe loading overlay shown when `loading` is true.
spinnerThe spinner inside the loading overlay.

Types

NameDefinition
VuCarouselChangeDetail
{ index: number; previous: number; }
VuCarouselControls
"none" | "arrows" | "dots" | "both"
VuCarouselGap
"sm" | "md" | "lg" | "none"
VuCarouselOrientation
"horizontal" | "vertical"

Related

Companions

  • Carousel Item`vu-carousel-item`

Surfaces

  • AccordionAn accordion component for expandable sections with keyboard navigation.
  • Accordion ItemA collapsible accordion item component with a header trigger and body panel.
  • CardA card component with media, header, body, and footer slots.

Guides

  • ThemingTokens and VuThemeProvider
  • StylingCSS parts and tokens
  • AppearanceSurface tone and radius

Browse

  • Previous: CardEarlier in the sidebar
  • Next: Carousel ItemLater in the sidebar
  • All componentsBrowse the full index