components
Tailwind CSS Stack
Stack elements positions them on top of each other in a visual manner.
The following example displays div’s without stacking.
Wrap the stacked div’s with a wrapper div using the component class stack
.
Apply the modifier class stack-animated to enable animation on hover.
By default, the stacking direction is from the bottom.
Apply the modifier class stack-bottom-start
to set the stack direction to bottom-start.
Apply the modifier class stack-bottom-end
to set the stack direction to bottom-end.
Apply the modifier class stack-top
to set the stack direction to top.
Apply the modifier class stack-top-start
to set the stack direction to top-start.
Apply the modifier class stack-top-end
to set the stack direction to top-end.
The example below demonstrates a stack with images.



The example below demonstrates a stack with cards.
Card A
Card B
Card C
The example below demonstrates a notifications stack.
3 Notifications
You have 3 unread messages. Tap here to see.
2 Notifications
You have 2 unread messages. Tap here to see.
Notification 1
You have an unread message. Tap here to see.