Styled quick start

Copy this entrypoint first. It includes the imports required to get the component on screen.

svelte
<script lang="ts">
  import '@dryui/ui/themes/default.css';
  import '@dryui/ui/themes/dark.css';
  import { Carousel } from '@dryui/ui';
</script>

<Carousel.Root>
  <Carousel.Viewport>...</Carousel.Viewport>
  <Carousel.Slide>...</Carousel.Slide>
  <Carousel.Prev>...</Carousel.Prev>
  <Carousel.Next>...</Carousel.Next>
  <Carousel.Dots>...</Carousel.Dots>
  <Carousel.Thumbnails>...</Carousel.Thumbnails>
</Carousel.Root>

Import options

Root package

ts
import { Carousel } from '@dryui/ui'

Per-component subpath

ts
import { Carousel } from '@dryui/ui/carousel'

API

Props, CSS variables, and the public data attributes you can target when styling.

Prop Type Description Default Required Bindable

Carousel.Root

orientation
horizontalvertical
Horizontal or vertical layout direction. 'horizontal' — —
loop
boolean
— false — —
autoplay
false
— false — —
children
Snippet
Content rendered inside the component. — ✓ —

Carousel.Viewport

children
Snippet
Content rendered inside the component. — ✓ —

Carousel.Slide

children
Snippet
Content rendered inside the component. — ✓ —

Carousel.Prev

children
Snippet
Content rendered inside the component. — — —

Carousel.Next

children
Snippet
Content rendered inside the component. — — —

Carousel.Dots

Carousel.Thumbnails

position
bottomleftright
— — — —
children
Snippet<[{ index: number; isActive: boolean; scrollTo: (index: number) => void }]>
Content rendered inside the component. — ✓ —