Navigation & disclosure@neumorphism-ui/carousel

Carousel

Uses Embla Carousel for scroll position and dragging while neumorphism is limited to the slide surfaces and controls. Previous and next buttons disable automatically at the ends.

@neumorphism-ui/carousel
Registry JSON

Preview

Dashboard
Settings
Analytics

Installation

Installation: carouselnpx shadcn@latest add @neumorphism-ui/carousel

The CLI resolves npm dependencies, base tokens, utilities, and component source in order.

New to this Registry? Set up the namespace before continuing.

Usage

Import

Carousel import code
"use client";
import {
  Carousel,
  CarouselContent,
  CarouselItem,
  CarouselNext,
  CarouselPrevious,
} from "@/components/ui/carousel";

Example

Carousel usage code
export default function Example() {
  return <Carousel aria-label="Feature tour" className="w-full max-w-md px-12">
    <CarouselContent>
      {["Dashboard", "Settings", "Analytics"].map((item) => <CarouselItem key={item}><div className="grid h-40 place-items-center rounded-[var(--neu-radius-surface)] border border-[var(--neu-edge)] bg-[var(--neu-surface)] [box-shadow:var(--neu-shadow-raised-sm)]">{item}</div></CarouselItem>)}
    </CarouselContent>
    <CarouselPrevious />
    <CarouselNext />
  </Carousel>;
}

API Reference

ComponentPropTypeDefaultDescription
Carouselorientation"horizontal" | "vertical""horizontal"Sets the scroll axis and matching arrow-key behavior.
CarouseloptsEmblaOptionsType—Passes Embla options such as loop and align.
CarouselsetApi(api: CarouselApi) => void—Provides the Embla API instance for external integrations.
CarouselItemchildrenReactNode—Contains the real content of one slide.
CarouselPrevious / CarouselNextlabelstring—Localizes the accessible name of the previous and next buttons.

Accessibility

  • 01

    Give Carousel an aria-label or aria-labelledby that identifies the region.

  • 02

    Slides use group semantics with a carousel slide description, while navigation buttons expose disabled state at the ends.

  • 03

    Horizontal carousels support Left and Right; vertical carousels support Up and Down.