import type { ComponentProps } from "../../types/component-props"; import type { SpacingScale, StackElement } from "../../types/layout-primitives"; import type React from "react"; /** * Props for the Stack component - a simplified layout primitive for vertical or horizontal spacing. * * Stack provides an easy-to-use flexbox-based layout for creating vertical or horizontal arrangements * with consistent spacing between children. It's simpler than the full Flex component, ideal for * common stacking patterns. * * ## Design Principles * - **Simplified API**: Fewer props than Flex for common use cases * - **Fluid Spacing**: Uses unified spacing scale with responsive values * - **Flexbox-Based**: Built on CSS flexbox for reliable layouts * - **Semantic HTML**: Defaults to `div` but supports semantic elements * * @example * // Vertical stack (default) * *

Title

*

Paragraph 1

*

Paragraph 2

*
* * @example * // Horizontal stack for buttons * * * * * * @example * // Centered vertical stack * * *

Welcome

*
*/ export interface StackProps extends Partial, Omit, "className"> { /** * Gap between children. * Uses unified spacing scale: '0' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' * Maps to CSS custom properties (--spacing-*) * @default 'md' * @example * Content */ gap?: SpacingScale; /** * Layout direction. * - 'vertical': Stack children vertically (column) * - 'horizontal': Stack children horizontally (row) * @default 'vertical' * @example * * * * */ direction?: "vertical" | "horizontal"; /** * Alignment on cross axis. * - 'start': Align items to start (left in horizontal, top in vertical) * - 'center': Center items * - 'end': Align items to end (right in horizontal, bottom in vertical) * - 'stretch': Stretch items to fill cross axis * @default 'stretch' * @example * Centered items */ align?: "start" | "center" | "end" | "stretch"; /** * Alignment on main axis. * - 'start': Items at start * - 'center': Items centered * - 'end': Items at end * - 'between': Space between items * @example * *
*