Skip to content

Stack

Used to layout its children in a vertical or horizontal stack.

Item 1
Item 2
Item 1
Item 2
// Import components
import {
Placeholder,
Stack,
} from '@fintech-sandpit/ui/react';
// Import styles (optional)
import '@fintech-sandpit/ui/style/components/placeholder.css';
import '@fintech-sandpit/ui/style/components/stack.css';
return (
<Stack className="gap-4">
<Placeholder className="h-20 w-40">
Item 1
</Placeholder>
<Placeholder className="h-20 w-40">
Item 2
</Placeholder>
</Stack>
);
// Import components
import {
Placeholder,
Stack,
} from '@fintech-sandpit/ui/react';
// Import styles (optional)
import '@fintech-sandpit/ui/style/components/placeholder.css';
import '@fintech-sandpit/ui/style/components/stack.css';
return (
<Stack
orientation="horizontal"
class="gap-4"
>
<Placeholder className="h-40 w-20">
Item 1
</Placeholder>
<Placeholder className="h-40 w-20">
Item 2
</Placeholder>
</Stack>
);
NameTypeDefaultDescription
orientationOrientationverticalStack orientation
export type Orientation = 'vertical' | 'horizontal'