# @bassyu/layout-component

> ## Container

Latest version **1.1.2** (published 2023-09-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @bassyu/layout-component
pnpm add @bassyu/layout-component
yarn add @bassyu/layout-component
bun add @bassyu/layout-component
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2023-09-26 |
| First published | 2023-09-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 13.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | bassyu |

## Links

- npm: https://www.npmjs.com/package/@bassyu/layout-component
- Repository: https://github.com/bassyu/layout-component
- Homepage: https://github.com/bassyu/layout-component#readme
- Issues: https://github.com/bassyu/layout-component/issues
- npm.io page: https://npm.io/package/@bassyu/layout-component

## Dependencies (1)

- [react](https://npm.io/package/react.md) ^18.2.0

## Recent versions

- 1.1.2 (latest) — 2023-09-26
- 1.1.1 — 2023-09-26
- 1.1.0 — 2023-09-25
- 1.0.15 — 2023-09-22
- 1.0.14 — 2023-09-22
- 1.0.13 — 2023-09-18
- 1.0.12 — 2023-09-18
- 1.0.11 — 2023-09-18
- 1.0.10 — 2023-09-18
- 1.0.9 — 2023-09-18
- 1.0.8 — 2023-09-18
- 1.0.7 — 2023-09-18
- 1.0.6 — 2023-09-18
- 1.0.4 — 2023-09-18
- 1.0.3 — 2023-09-18
- … 3 more at https://npm.io/package/@bassyu/layout-component/versions

## README

# @bassyu/layout-component

## Container

기본적인 컨테이너 레이아웃 입니다.

가운데 정렬을 합니다.

### 속성

| 속성     | 기본값   | 설명                                  |
| -------- | -------- | ------------------------------------- |
| as       | `'div'`  | Block-level 요소의 이름을 지정합니다. |
| minWidth | `'none'` | 해당 픽셀만큼 최소 너비를 지정합니다. |
| maxWidth | `'none'` | 해당 픽셀만큼 최대 너비를 지정합니다. |

### 예제

```tsx
import { Container } from '@bassyu/layout-component';

const App = () => (
  <Container minWidth={600} maxWidth={960}>
    <div>Content</div>
  </Container>
);
```

## Grid

Grid 레이아웃의 속성을 사용하는 컴포넌트 입니다.

### 속성

`Container` 속성을 상속 받습니다.

| 속성    | 기본값 | 설명                         |
| ------- | ------ | ---------------------------- |
| rows    | `1`    | 행 개수를 줍니다.            |
| columns | `1`    | 열 개수를 줍니다.            |
| gap     | `0`    | 해당 픽셀만큼 간격을 줍니다. |

### 예제

```tsx
import { Grid } from '@bassyu/layout-component';

const App = () => (
  <Grid rows={3} columns={3} gap={10} minWidth={600} maxWidth={960}>
    <div>Item 1</div>
    <div>Item 2</div>
    <div>Item 3</div>
  </Grid>
);
```

## Flex

Flex 레이아웃의 속성을 사용하는 컴포넌트 입니다.

### 속성

`Container` 속성을 상속 받습니다.

| 속성      | 기본값      | 설명                         |
| --------- | ----------- | ---------------------------- |
| direction | `undefined` | 축의 방향을 줍니다.          |
| justify   | `undefined` | 축 정렬을 합니다.            |
| align     | `undefined` | 아이템 정렬을 합니다.        |
| gap       | `0`         | 해당 픽셀만큼 간격을 줍니다. |

### 예제

```tsx
import { Flex } from '@bassyu/layout-component';

const App = () => (
  <Flex direction="row" justify="center" align="center" gap={5} minWidth={600} maxWidth={960}>
    <div>Item 1</div>
    <div>Item 2</div>
    <div>Item 3</div>
  </Flex>;
);
```

## Masonry

자식의 높이를 계산해서 Masonry 레이아웃으로 재정렬 해주는 컴포넌트입니다.

### 속성

`Container` 속성을 상속 받습니다.

| 속성    | 기본값 | 설명                         |
| ------- | ------ | ---------------------------- |
| columns | `2`    | 열의 개수를 줍니다.          |
| gap     | `0`    | 해당 픽셀만큼 간격을 줍니다. |

### 예제

```tsx
import { Masonry } from '@bassyu/layout-component';

const App = () => (
  <Masonry columns={3} gap={5} minWidth={600}>
    <div>Item 1</div>
    <div>Item 2</div>
    <div>Item 3</div>
  </Masonry>;
);
```

---
_Source: https://npm.io/package/@bassyu/layout-component · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
