Carousel

A rotating set of slides for showcasing images or content.

When to Use

  • For image slideshows or banners
  • To cycle through featured content
  • For onboarding or tutorial slides

Import

import { Carousel } from "orizon";

Examples

Basic

Slide 1
Slide 2
Slide 3
<Carousel>
  <div><h3>Slide 1</h3></div>
  <div><h3>Slide 2</h3></div>
  <div><h3>Slide 3</h3></div>
</Carousel>

Autoplay

Auto 1
Auto 2
Auto 3
<Carousel autoplay>
  <div><h3>Slide 1</h3></div>
  <div><h3>Slide 2</h3></div>
  <div><h3>Slide 3</h3></div>
</Carousel>

Fade Effect

Fade 1
Fade 2
<Carousel effect="fade">
  <div><h3>Slide 1</h3></div>
  <div><h3>Slide 2</h3></div>
</Carousel>

API

CarouselProps

  • autoplayboolean — Auto-advance slides (default: false)
  • dotsboolean — Show dot indicators (default: true)
  • dotPosition"top" | "bottom" | "left" | "right" — Dot position (default: "bottom")
  • effect"scrollx" | "fade" — Transition effect (default: "scrollx")
  • slidesToShownumber — Visible slides at once (default: 1)
  • arrowsboolean — Show navigation arrows (default: false)
  • initialSlidenumber — Starting slide index (default: 0)
  • infiniteboolean — Loop slides (default: true)
  • beforeChange(from: number, to: number) => void — Before slide change
  • afterChange(current: number) => void — After slide change

Ref Methods

  • goTo(slideNumber) — Navigate to specific slide
  • next() — Go to next slide
  • prev() — Go to previous slide