본문으로 건너뛰기

Stack()

function Stack(props): ReactNode

자식 컴포넌트를 스택으로 렌더링하는 컴포넌트입니다.

Parameters

ParameterTypeDescription
propsStackProps & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>StackProps를 참조하세요.

Returns

ReactNode

해당하는 컴포넌트를 반환합니다.

Example

// 중앙 정렬, 10px 간격
<Stack justify='center' align='center' gap={10}>
{children}
</Stack>

// 양끝 정렬
<Stack justify='space-between'>
{children}
</Stack>

// 상단 정렬
<Stack align='flex-start'>
{children}
</Stack>

// 가로 방향 정렬
<Stack direction='row'>
{children}
</Stack>

// 세로 방향 정렬
<Stack direction='column'>
{children}
</Stack>

// inline flex 설정
<Stack inline>
{children}
</Stack>