GitHub

Carousel

Horizontal slider for cycling through content

Basic Usage

Loading...

Installation

pnpm add @corew500/ui

Usage

import { Carousel } from "@corew500/ui/carousel"

<Carousel>Content</Carousel>

CMS Integration

CMSPayload CMS Integration
This component supports CMS-driven content via @corew500/cms-payload.
Loading...

API Reference

Props

PropTypeDefaultDescription
optsPartial<OptionsType>
pluginsCreatePluginType<LoosePluginType, {}>[]
orientationenumhorizontal
setApi(api: EmblaCarouselType) => void
loadingenumfalseShow skeleton loading state
loadingItemsnumber3Number of skeleton items to show when loading (default: 3)
loadingItemRenderer(index: number) => ReactNodeCustom skeleton item renderer

Accessibility

Keyboard Navigation

  • Arrow keys navigate between slides.

Screen Readers

  • - Uses `role="region"` with `aria-roledescription="carousel"`.
  • Each slide has `role="group"` with `aria-roledescription="slide"`.
  • Previous/Next buttons include screen reader text.

Localization

Translatable Content

  • - Button labels ("Previous slide", "Next slide") can be customized via children.