StellarAdmin

Stack

Arrange elements and components within a vertical flex container.

Usage

<sa-stack>...</sa-stack>

Examples

Gap

Control the vertical gap between items with the gap attribute. You can specify a custom gap by adding a class from Tailwind's gap- utility.

<p>Extra small</p>
<sa-stack gap="ExtraSmall" class="font-mono text-sm leading-6 font-bold text-white bg-indigo-100 rounded">
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">01</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">02</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">03</div>
</sa-stack>
<p>Small</p>
<sa-stack gap="Small" class="font-mono text-sm leading-6 font-bold text-white bg-indigo-100 rounded">
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">01</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">02</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">03</div>
</sa-stack>
<p>Default</p>
<sa-stack class="font-mono text-sm leading-6 font-bold text-white bg-indigo-100 rounded">
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">01</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">02</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">03</div>
</sa-stack>
<p>Large</p>
<sa-stack gap="Large" class="font-mono text-sm leading-6 font-bold text-white bg-indigo-100 rounded">
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">01</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">02</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">03</div>
</sa-stack>
<p>Extra large</p>
<sa-stack gap="ExtraLarge" class="font-mono text-sm leading-6 font-bold text-white bg-indigo-100 rounded">
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">01</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">02</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">03</div>
</sa-stack>

Justify

Control how items are positioned along a stack's vertical axis.

<p>Center</p>
<sa-stack justify="Center" class="font-mono text-sm leading-6 font-bold text-white bg-indigo-100 rounded h-[300px]">
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">01</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">02</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">03</div>
</sa-stack>
<p>Start</p>
<sa-stack justify="Start" class="font-mono text-sm leading-6 font-bold text-white bg-indigo-100 rounded h-[300px]">
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">01</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">02</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">03</div>
</sa-stack>
<p>End</p>
<sa-stack justify="End" class="font-mono text-sm leading-6 font-bold text-white bg-indigo-100 rounded h-[300px]">
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">01</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">02</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">03</div>
</sa-stack>
<p>Space between</p>
<sa-stack justify="SpaceBetween" class="font-mono text-sm leading-6 font-bold text-white bg-indigo-100 rounded h-[300px]">
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">01</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">02</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">03</div>
</sa-stack>
<p>Space around</p>
<sa-stack justify="SpaceAround" class="font-mono text-sm leading-6 font-bold text-white bg-indigo-100 rounded h-[300px]">
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">01</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">02</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 p-4">03</div>
</sa-stack>

Align

Control how items are positioned along a stack's horizontal axis.

<p>Stretch</p>
<sa-stack align="Stretch" class="font-mono text-sm leading-6 font-bold text-white bg-indigo-100 rounded">
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 py-4 px-12">01</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 py-4 px-4">02</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 py-4 px-6">03</div>
</sa-stack>
<p>Start</p>
<sa-stack align="Start" class="font-mono text-sm leading-6 font-bold text-white bg-indigo-100 rounded">
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 py-4 px-12">01</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 py-4 px-4">02</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 py-4 px-6">03</div>
</sa-stack>
<p>End</p>
<sa-stack align="End" class="font-mono text-sm leading-6 font-bold text-white bg-indigo-100 rounded">
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 py-4 px-12">01</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 py-4 px-4">02</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 py-4 px-6">03</div>
</sa-stack>
<p>Center</p>
<sa-stack align="Center" class="font-mono text-sm leading-6 font-bold text-white bg-indigo-100 rounded">
    <div class="flex flex-1 items-center justify-center rounded-lg bg-indigo-500 py-4 px-12">01</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 py-4 px-4">02</div>
    <div class="flex items-center justify-center rounded-lg bg-indigo-500 py-4 px-6">03</div>
</sa-stack>