Stack
Stack visually puts elements on top of each other, like stacked papers or cards.
Import
import { Stack } from '@sigx/daisyui';
Basic Usage
Use w-* and h-* classes on the Stack to set the size of all stacked items.
Loading preview...
Stacked Images
Loading preview...
Stacked Cards
Loading preview...
Directions
Use the direction prop to control the alignment of stacked elements.
Top Direction
Loading preview...
Start Direction
Loading preview...
End Direction
Loading preview...
With Shadows
Add shadows to create depth in the stack.
Loading preview...
Notification Cards
A practical example showing notification cards in a stack.
Loading preview...
Props
| Prop | Type | Default | Description |
|---|---|---|---|
direction | 'top' | 'bottom' | 'start' | 'end' | 'bottom' | Alignment direction of the stacked elements |
class | string | - | Additional CSS classes. Use w-* and h-* to set stack size |
CSS Classes
The Stack component uses DaisyUI's stack CSS class under the hood:
| Class | Description |
|---|---|
stack | Main component class - puts children on top of each other |
stack-top | Aligns children to the top |
stack-bottom | Aligns children to the bottom (default) |
stack-start | Aligns children to the start (horizontally) |
stack-end | Aligns children to the end (horizontally) |