@gfazioli/mantine-depth-select
A 3D stack select component inspired by macOS Time Machine for React applications built with Mantine. Navigate through stacked cards with perspective transforms and smooth transitions.
Installation
After installation import package styles at the root of your application:
You can import styles within a layer
@layer mantine-depth-select by importing
@gfazioli/mantine-depth-select/styles.layer.css file.
Usage
A 3D stack select component inspired by macOS Time Machine. Navigate through stacked cards with perspective transforms and smooth transitions. Use keyboard arrows, click the second card, mouse wheel, touch swipe, or use the built-in controls to navigate.
The controlsPosition prop controls where the navigation
arrows are placed: right (default) or left.
Set withControls={false} to hide the built-in
controls and use your own.
You must set w and h props to define the area
where cards live. Cards should use h="100%" to
fill the available height.
Snapshot 1
Today
Controlled
Use value and onChange for controlled mode.
Navigation also works via keyboard (ArrowUp/Down,
Home/End), mouse wheel, and touch swipe:
Snapshot 2
Yesterday
Scroll navigation
By default, you can navigate the stack using the mouse
wheel or trackpad gestures. The page scroll is
automatically blocked while interacting with the
component. Set withScrollNavigation={false} to
disable this behavior.
Loop
Set loop to enable infinite navigation. When you
reach the last item, the next navigation wraps back
to the first item and vice versa:
Slide 1
First item — loops back from the last
Controls alignment
Use controlsProps to customize the built-in
controls. The justify prop aligns them vertically:
start (top), center (default), or end (bottom).
You can also set w for a fixed width to prevent
layout shifts when labels change:
Snapshot 1
Today
Custom controls
Set withControls={false} to hide the built-in
navigation and use your own controls. Use value
and onChange to manage navigation externally:
Snapshot 2
Yesterday
snap-2 (2/3)
Controls as children
You can also use DepthSelect.Controls as a child
component with withControls={false}. This gives you
access to props like labelFormatter directly on
the controls:
Snapshot 2
Yesterday
Rich cards
You can use any React content inside items. Here is an example with decorated cards featuring images, badges and buttons:

Hawaii Beach Retreat
Relax on pristine beaches with crystal clear waters and enjoy tropical island activities
Use cases
Pricing plan selector
The depth stack creates a natural visual hierarchy, making the front card feel "recommended." Navigate between plans to compare features:
Pro
$19/month
- Unlimited projects
- 10 GB storage
- Priority support
- Custom domain
Document version history
Browse through document versions with author info and change summaries. The depth effect naturally communicates "older = further back":
John Doe
2 hours ago
+ Added error handling for API calls
Onboarding wizard
A step-by-step onboarding flow where completed steps move behind the current one. More engaging than a traditional linear stepper:
Welcome!
Let us show you around. This quick tour will help you get started with the most important features.
Step 1 of 4
Emoji stack
Items don't need to be cards — any React content works. This example uses emoji with varying widths to test how different-sized content behaves:
🎉🎈
Styles API
DepthSelect supports
Styles API,
you can add styles to any inner element of the component
with classNames prop.
Snapshot 1
Today
Component Styles API
Hover over selectors to highlight corresponding elements


