Universal Component

Stack

A direction-first Flexbox wrapper for evenly spaced vertical or horizontal layouts.

This page was migrated by AI, please review carefully

Migration is complete, but please validate against source code and manual review.

Stack

Use Stack for simple one-dimensional layouts such as form sections, button groups, and compact panel content.

Basic Usage

Stack

Demo will load when visible.
<template>
  <div style="width: 360px; padding: 16px; border: 1px solid var(--tx-border-color); border-radius: 12px;">
    <TxStack :gap="10">
      <TxButton>One</TxButton>
      <TxButton variant="secondary">
        Two
      </TxButton>
      <TxButton variant="ghost">
        Three
      </TxButton>
    </TxStack>
  </div>
</template>

API

Props

PropTypeDefaultDescription
direction'horizontal' | 'vertical''vertical'Direction
gapnumber | string12Gap
alignstring'stretch'align-items
justifystring'flex-start'justify-content
wrapbooleanfalseAllows children to wrap onto multiple lines.
inlinebooleanfalseUses inline-flex instead of block-level flex.