UNPKG

@papernote/ui

Version:

A modern React component library with a paper notebook aesthetic - minimal, professional, and expressive

51 lines 1.53 kB
import React from 'react'; type SpacingValue = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'; export interface StackProps extends React.HTMLAttributes<HTMLDivElement> { /** Content to stack */ children: React.ReactNode; /** Direction of stack */ direction?: 'vertical' | 'horizontal'; /** Spacing between items (alias: gap) */ spacing?: SpacingValue; /** Spacing between items (alias for spacing - for developer convenience) */ gap?: SpacingValue; /** Alignment of items */ align?: 'start' | 'center' | 'end' | 'stretch'; /** Justify content */ justify?: 'start' | 'center' | 'end' | 'between' | 'around'; /** Enable wrapping (for horizontal stacks) */ wrap?: boolean; /** Custom className */ className?: string; } /** * Stack component for arranging children vertically or horizontally with consistent spacing. * * Supports ref forwarding for DOM access. * * Spacing scale (use either `spacing` or `gap` prop - they're aliases): * - none: 0 * - xs: 0.5rem (2) * - sm: 0.75rem (3) * - md: 1.5rem (6) * - lg: 2rem (8) * - xl: 3rem (12) * * @example * ```tsx * // Using spacing prop * <Stack spacing="md"> * <Card>Item 1</Card> * <Card>Item 2</Card> * </Stack> * * // Using gap prop (alias) * <Stack gap="md"> * <Card>Item 1</Card> * <Card>Item 2</Card> * </Stack> * ``` */ export declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLDivElement>>; export default Stack; //# sourceMappingURL=Stack.d.ts.map