Depth Tiles

Use Depth Tiles to present a small set of visual cards as a continuously cycling, layered stack. The active tile stays in focus while neighboring tiles recede behind it, and people can move through the loop automatically or with a horizontal drag.

Preview

Reduce motion:Off
Tune:Off
Inspect
Green leaf with soft natural light. 320 / Doodle, item 1 of 3. Use the left and right arrow keys to navigate.

Features

  • Infinite autoplay cycling
  • Continuous, velocity-aware pointer drag and touch swipe
  • Controlled and uncontrolled active index support
  • Pauses while hovered, focused, dragged, or hidden in a background tab
  • Arrow-key and screen-reader navigation
  • Reduced-motion mode with instant tile changes and no autoplay

Playground

Installation

Usage

API

PropertyTypeDefaultDescription
itemsDepthTileItem[]requiredTiles shown in the infinite stack.
indexnumberundefinedControlled active tile index.
defaultIndexnumber0Initial active tile index when uncontrolled.
onIndexChange(index: number) => voidundefinedCalled after the active tile changes.
autoplaybooleantrueEnables automatic forward movement.
intervalnumber3200Time between automatic advances in milliseconds.
pauseOnHoverbooleantruePauses autoplay while the pointer is over the component.
draggablebooleantrueEnables horizontal pointer drag and touch swipe.
ariaLabelstring"Depth tiles"Accessible label for the carousel region.
classNamestringundefinedAdditional classes for the component.

Accessibility

Provide meaningful alt text for every tile image. The active tile is exposed as the current visual item, while tiles behind it are hidden from assistive technology.

Styling

Use className to size or position the component within its layout. The component owns the card overlap and depth treatment so the stack remains responsive.

License & Usage

Sona UI is available under the MIT license. You may use, modify, and distribute this component in personal and commercial projects.

Was this page helpful?

Your response helps us improve component docs.

Related components