Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 880 Bytes

File metadata and controls

47 lines (35 loc) · 880 Bytes

Stack

A flex layout utility for vertical or horizontal stacking with consistent gaps.

Import

import { Stack } from '@florex/ui';

Usage

<Stack>
  <p>Item 1</p>
  <p>Item 2</p>
</Stack>

Props

Prop Type Default Description
direction 'row' | 'column' 'column' Flex direction
gap 'sm' | 'md' | 'lg' 'md' Gap between children (sm=8px, md=16px, lg=24px)
children ReactNode Stack content
className string Additional CSS classes

Examples

Horizontal

<Stack direction="row" gap="sm">
  <Button>Cancel</Button>
  <Button variant="primary">Save</Button>
</Stack>

Vertical with large gap

<Stack direction="column" gap="lg">
  <Card><p>Section 1</p></Card>
  <Card><p>Section 2</p></Card>
</Stack>