file: blocks/footer.mdx
# Footer
페이지 하단에 사이트 정보, 링크, 법적 고지 등을 표시하는 블록입니다.
- npm: npx @seed-design/cli@latest add block:footer-01
- pnpm: pnpm dlx @seed-design/cli@latest add block:footer-01
- yarn: yarn dlx @seed-design/cli@latest add block:footer-01
- bun: bun x @seed-design/cli@latest add block:footer-01
- npm: npx @seed-design/cli@latest add block:footer-02
- pnpm: pnpm dlx @seed-design/cli@latest add block:footer-02
- yarn: yarn dlx @seed-design/cli@latest add block:footer-02
- bun: bun x @seed-design/cli@latest add block:footer-02
- npm: npx @seed-design/cli@latest add block:footer-03
- pnpm: pnpm dlx @seed-design/cli@latest add block:footer-03
- yarn: yarn dlx @seed-design/cli@latest add block:footer-03
- bun: bun x @seed-design/cli@latest add block:footer-03
- npm: npx @seed-design/cli@latest add block:footer-04
- pnpm: pnpm dlx @seed-design/cli@latest add block:footer-04
- yarn: yarn dlx @seed-design/cli@latest add block:footer-04
- bun: bun x @seed-design/cli@latest add block:footer-04
---
file: blocks/layout.mdx
# Layout
페이지의 콘텐츠 영역을 반응형으로 제한하고 중앙 정렬하는 페이지 레이아웃 블록입니다.
## Usage \[#usage]
```tsx
import { Layout } from "@seed-design/react";
```
```tsx
{/* 콘텐츠 */}
```
## Props \[#props]
### `Layout.Root` \[#layoutroot]
- `density`
- type: `"medium" | "low" | "high" | undefined`
- default: `"medium"`
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### `Layout.Content` \[#layoutcontent]
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
## Density \[#density]
`density` prop으로 콘텐츠 영역의 최대 너비를 조절합니다.
## Blocks \[#blocks]
- npm: npx @seed-design/cli@latest add block:layout-01
- pnpm: pnpm dlx @seed-design/cli@latest add block:layout-01
- yarn: yarn dlx @seed-design/cli@latest add block:layout-01
- bun: bun x @seed-design/cli@latest add block:layout-01
- npm: npx @seed-design/cli@latest add block:layout-02
- pnpm: pnpm dlx @seed-design/cli@latest add block:layout-02
- yarn: yarn dlx @seed-design/cli@latest add block:layout-02
- bun: bun x @seed-design/cli@latest add block:layout-02
---
file: blocks/side-navigation.mdx
# Side Navigation
서비스의 최상위 메뉴 간 이동을 돕고 앱의 전체 구조를 탐색할 수 있게 하는 컴포넌트입니다.
## Installation \[#installation]
- npm: npx @seed-design/cli@latest add ui:side-navigation
- pnpm: pnpm dlx @seed-design/cli@latest add ui:side-navigation
- yarn: yarn dlx @seed-design/cli@latest add ui:side-navigation
- bun: bun x @seed-design/cli@latest add ui:side-navigation
## Examples \[#examples]
- npm: npx @seed-design/cli@latest add block:side-navigation-01
- pnpm: pnpm dlx @seed-design/cli@latest add block:side-navigation-01
- yarn: yarn dlx @seed-design/cli@latest add block:side-navigation-01
- bun: bun x @seed-design/cli@latest add block:side-navigation-01
- npm: npx @seed-design/cli@latest add block:side-navigation-02
- pnpm: pnpm dlx @seed-design/cli@latest add block:side-navigation-02
- yarn: yarn dlx @seed-design/cli@latest add block:side-navigation-02
- bun: bun x @seed-design/cli@latest add block:side-navigation-02
## Props \[#props]
### SideNavigationProvider \[#sidenavigationprovider]
- `children`
- type: `React.ReactNode`
- required: `true`
- `collapsed`
- type: `boolean | undefined`
- `defaultCollapsed`
- type: `boolean | undefined`
- `onCollapsedChange`
- type: `((collapsed: boolean) => void) | undefined`
### SideNavigationRoot \[#sidenavigationroot]
- `tone`
- type: `"neutral" | "transparent" | undefined`
- default: `"neutral"`
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### SideNavigationHeader \[#sidenavigationheader]
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### SideNavigationContent \[#sidenavigationcontent]
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### SideNavigationFooter \[#sidenavigationfooter]
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### SideNavigationTrigger \[#sidenavigationtrigger]
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### SideNavigationGroup \[#sidenavigationgroup]
- `label`
- type: `React.ReactNode`
- `items`
- type: `({ key?: React.Key; label: React.ReactNode; prefixIcon?: React.ReactNode; } & ({ current?: boolean; disabled?: boolean; onClick?: React.MouseEventHandler; items?: never; defaultOpen?: never; } | { current?: never; disabled?: never; onClick?: never; defaultOpen?: boolean; items: { key?: React.Key; label: React.ReactNode; current?: boolean; disabled?: boolean; onClick?: React.MouseEventHandler; }[]; }))[]`
- required: `true`
### SideNavigationItemButton \[#sidenavigationitembutton]
- `prefixIcon`
- type: `React.ReactNode`
- `label`
- type: `React.ReactNode`
- required: `true`
- `suffixIcon`
- type: `React.ReactNode`
- `disableTooltip`
- type: `boolean | undefined`
- description: Suppresses the collapsed-state label tooltip. Set when the button is a NavigationMenuTrigger, which already reveals the label via its flyout.
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
- `current`
- type: `boolean | undefined`
- `disabled`
- type: `boolean | undefined`
### SideNavigationInset \[#sidenavigationinset]
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
---
file: components/(deprecated)/action-chip.mdx
# Action Chip
더 이상 사용되지 않습니다. [Chip](/react/components/chip)의 `Chip.Button`에 `variant="solid"`를 사용하세요.
## Preview
```tsx
import { ActionChip } from "@seed-design/react";
export default function ActionChipPreview() {
return 라벨;
}
```
## Usage \[#usage]
```tsx
import { ActionChip } from "@seed-design/react";
```
```tsx
```
## Props \[#props]
- `size`
- type: `"small" | "medium" | undefined`
- default: `"medium"`
- `layout`
- type: `"withText" | "iconOnly" | undefined`
- default: `"withText"`
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
## Examples \[#examples]
### Medium \[#medium]
```tsx
import { ActionChip } from "@seed-design/react";
export default function ActionChipMedium() {
return 라벨;
}
```
### Small \[#small]
```tsx
import { ActionChip } from "@seed-design/react";
export default function ActionChipSmall() {
return 라벨;
}
```
### Icon Only \[#icon-only]
```tsx
import { IconPlusFill } from "@karrotmarket/react-monochrome-icon";
import { ActionChip, Icon } from "@seed-design/react";
export default function ActionChipIconOnly() {
return (
} />
);
}
```
### Prefix Icon \[#prefix-icon]
```tsx
import { IconPlusFill } from "@karrotmarket/react-monochrome-icon";
import { ActionChip, PrefixIcon } from "@seed-design/react";
export default function ActionChipPrefixIcon() {
return (
} />
라벨
);
}
```
### Suffix Icon \[#suffix-icon]
```tsx
import { IconChevronDownFill } from "@karrotmarket/react-monochrome-icon";
import { ActionChip, SuffixIcon } from "@seed-design/react";
export default function ActionChipSuffixIcon() {
return (
라벨
} />
);
}
```
---
file: components/(deprecated)/action-sheet.mdx
# Action Sheet
더 이상 사용되지 않습니다. [Swipeable Menu Sheet](/react/components/swipeable-menu-sheet)을 사용하세요.
## Preview
```tsx
import {
ActionSheetContent,
ActionSheetItem,
ActionSheetRoot,
ActionSheetTrigger,
} from "seed-design/ui/action-sheet";
import { ActionButton } from "seed-design/ui/action-button";
const ActionSheetPreview = () => {
return (
Open
);
};
export default ActionSheetPreview;
```
## Installation \[#installation]
- npm: npx @seed-design/cli@latest add ui:action-sheet
- pnpm: pnpm dlx @seed-design/cli@latest add ui:action-sheet
- yarn: yarn dlx @seed-design/cli@latest add ui:action-sheet
- bun: bun x @seed-design/cli@latest add ui:action-sheet
## Props \[#props]
### `ActionSheetRoot` \[#actionsheetroot]
- `lazyMount`
- type: `boolean | undefined`
- default: `true`
- description: Whether to enable lazy mounting
- `unmountOnExit`
- type: `boolean | undefined`
- default: `true`
- description: Whether to unmount on exit.
- `children`
- type: `React.ReactNode`
- required: `true`
- `role`
- type: `"alertdialog" | "dialog" | undefined`
- default: `"dialog"`
- description: The role of the dialog.
- `modal`
- type: `boolean | undefined`
- default: `true`
- description: Whether the dialog should behave as a modal overlay. When true, focus is trapped, background content is hidden from assistive technology, and \`aria-modal\` is set. Set to \`false\` to temporarily suspend modal behavior (e.g., when a Stackflow Activity is pushed on top of a mounted dialog).
- `closeOnInteractOutside`
- type: `boolean | undefined`
- default: `true`
- description: Whether to close the dialog when the outside is clicked
- `closeOnEscape`
- type: `boolean | undefined`
- default: `true`
- description: Whether to close the dialog when the escape key is pressed
- `open`
- type: `boolean | undefined`
- `defaultOpen`
- type: `boolean | undefined`
- `onOpenChange`
- type: `((open: boolean, details?: DialogChangeDetails) => void) | undefined`
### `ActionSheetContent` \[#actionsheetcontent]
- `title`
- type: `React.ReactNode`
- `description`
- type: `React.ReactNode`
- `layerIndex`
- type: `number | undefined`
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### `ActionSheetItem` \[#actionsheetitem]
- `label`
- type: `React.ReactNode`
- required: `true`
- `tone`
- type: `"critical" | "neutral" | undefined`
- default: `"neutral"`
## Examples \[#examples]
### Portalled \[#portalled]
``으로 ``를 감싸서 컨텐츠를 원하는 요소에 렌더링할 수 있습니다.
Portal은 기본적으로 `document.body`에 렌더링됩니다.
```tsx
import { Portal } from "@seed-design/react";
import { ActionButton } from "seed-design/ui/action-button";
import {
ActionSheetContent,
ActionSheetItem,
ActionSheetRoot,
ActionSheetTrigger,
} from "seed-design/ui/action-sheet";
const ActionSheetPortalled = () => {
return (
Open
);
};
export default ActionSheetPortalled;
```
---
file: components/(deprecated)/columns.mdx
# Columns
여러 열로 구성된 레이아웃을 구성합니다. 디자인 토큰을 JSX에서 사용할 수 있도록 도와줍니다.
더 이상 사용되지 않습니다. [`HStack`](/react/components/layout/h-stack)과 `wrap` prop을 사용하세요.
## Preview
```tsx
import { Column, Columns } from "@seed-design/react";
/**
* @deprecated use `HStack` instead.
*/
export default function ColumnsPreview() {
return (
1
Content Width
2
);
}
```
## Usage \[#usage]
```tsx
import { Columns, Column } from "@seed-design/react";
```
```tsx
```
## Props \[#props]
### `Columns` \[#columns]
- `asChild`
- type: `boolean | undefined`
- `color`
- type: `(string & {}) | ScopedColorFg | ScopedColorPalette | undefined`
- `margin`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Margin on all four sides. Cannot be combined with any \`bleed\*\` prop.
- `m`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`margin\`. Cannot be combined with any \`bleed\*\` prop.
- `marginX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Horizontal margin (left + right). Cannot be combined with any \`bleed\*\` prop.
- `mx`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginX\`. Cannot be combined with any \`bleed\*\` prop.
- `marginY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Vertical margin (top + bottom). Cannot be combined with any \`bleed\*\` prop.
- `my`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginY\`. Cannot be combined with any \`bleed\*\` prop.
- `marginTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Top margin. Cannot be combined with any \`bleed\*\` prop.
- `mt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginTop\`. Cannot be combined with any \`bleed\*\` prop.
- `marginRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Right margin. Cannot be combined with any \`bleed\*\` prop.
- `mr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginRight\`. Cannot be combined with any \`bleed\*\` prop.
- `marginBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Bottom margin. Cannot be combined with any \`bleed\*\` prop.
- `mb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginBottom\`. Cannot be combined with any \`bleed\*\` prop.
- `marginLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Left margin. Cannot be combined with any \`bleed\*\` prop.
- `ml`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginLeft\`. Cannot be combined with any \`bleed\*\` prop.
- `bleed`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative margin on all four sides to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedX`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative x-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedY`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative y-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedTop`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative top margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedRight`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative right margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedBottom`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative bottom margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedLeft`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative left margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `flexGrow`
- type: `true | 0 | 1 | (number & {}) | undefined`
- description: If true, flex-grow will be set to \`1\`.
- `position`
- type: `"fixed" | "relative" | "absolute" | "sticky" | undefined`
- `overflowX`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- `overflowY`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- `paddingX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `height`
- type: `ResponsiveValue | undefined`
- `maxHeight`
- type: `ResponsiveValue | undefined`
- `minHeight`
- type: `ResponsiveValue | undefined`
- `justifyContent`
- type: `"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | undefined`
- `alignItems`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `bg`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- description: Shorthand for \`background\`.
- `background`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- `bgGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- description: Shorthand for \`backgroundGradient\`.
- `backgroundGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- `bgGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: Shorthand for \`backgroundGradientDirection\`. e.g. \`43deg\`
- `backgroundGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: e.g. \`43deg\`
- `borderColor`
- type: `(string & {}) | ScopedColorPalette | ScopedColorStroke | undefined`
- `borderWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderTopWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRightWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderBottomWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderLeftWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderTopLeftRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderTopRightRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderBottomRightRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderBottomLeftRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `boxShadow`
- type: `(string & {}) | "s1" | "s2" | "s3" | undefined`
- `width`
- type: `ResponsiveValue | undefined`
- `minWidth`
- type: `ResponsiveValue | undefined`
- `maxWidth`
- type: `ResponsiveValue | undefined`
- `top`
- type: `0 | (string & {}) | undefined`
- `left`
- type: `0 | (string & {}) | undefined`
- `right`
- type: `0 | (string & {}) | undefined`
- `bottom`
- type: `0 | (string & {}) | undefined`
- `padding`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `p`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`padding\`.
- `px`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingX\`.
- `paddingY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `py`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingY\`.
- `paddingTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- `pt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- description: Shorthand for \`paddingTop\`.
- `paddingRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `pr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingRight\`.
- `paddingBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- `pb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- description: Shorthand for \`paddingBottom\`.
- `paddingLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `pl`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingLeft\`.
- `zIndex`
- type: `number | (string & {}) | undefined`
- `flexShrink`
- type: `true | 0 | (number & {}) | undefined`
- description: If true, flex-shrink will be set to \`1\`.
- `flexDirection`
- type: `ResponsiveValue<"row" | "column" | "row-reverse" | "column-reverse"> | undefined`
- `flexWrap`
- type: `true | "wrap" | "wrap-reverse" | "nowrap" | undefined`
- description: If true, flex-wrap will be set to \`wrap\`.
- `justifySelf`
- type: `"center" | "stretch" | "start" | "end" | undefined`
- description: In flexbox layout, this property is ignored.
- `alignContent`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `alignSelf`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `gap`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `gridColumn`
- type: `string | undefined`
- `gridRow`
- type: `string | undefined`
- `unstable_transform`
- type: `string | undefined`
- `_active`
- type: `{ bg?: ScopedColorBg | ScopedColorPalette | (string & {}); background?: ScopedColorBg | ScopedColorPalette | (string & {}); } | undefined`
- `as`
- type: `React.ElementType | undefined`
- `hideFrom`
- type: `BreakpointThreshold | undefined`
### `Column` \[#column]
- `asChild`
- type: `boolean | undefined`
- `color`
- type: `(string & {}) | ScopedColorFg | ScopedColorPalette | undefined`
- `margin`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Margin on all four sides. Cannot be combined with any \`bleed\*\` prop.
- `m`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`margin\`. Cannot be combined with any \`bleed\*\` prop.
- `marginX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Horizontal margin (left + right). Cannot be combined with any \`bleed\*\` prop.
- `mx`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginX\`. Cannot be combined with any \`bleed\*\` prop.
- `marginY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Vertical margin (top + bottom). Cannot be combined with any \`bleed\*\` prop.
- `my`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginY\`. Cannot be combined with any \`bleed\*\` prop.
- `marginTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Top margin. Cannot be combined with any \`bleed\*\` prop.
- `mt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginTop\`. Cannot be combined with any \`bleed\*\` prop.
- `marginRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Right margin. Cannot be combined with any \`bleed\*\` prop.
- `mr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginRight\`. Cannot be combined with any \`bleed\*\` prop.
- `marginBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Bottom margin. Cannot be combined with any \`bleed\*\` prop.
- `mb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginBottom\`. Cannot be combined with any \`bleed\*\` prop.
- `marginLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Left margin. Cannot be combined with any \`bleed\*\` prop.
- `ml`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginLeft\`. Cannot be combined with any \`bleed\*\` prop.
- `bleed`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative margin on all four sides to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedX`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative x-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedY`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative y-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedTop`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative top margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedRight`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative right margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedBottom`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative bottom margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedLeft`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative left margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `flexGrow`
- type: `true | 0 | 1 | (number & {}) | undefined`
- description: If true, flex-grow will be set to \`1\`.
- `position`
- type: `"fixed" | "relative" | "absolute" | "sticky" | undefined`
- `overflowX`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- `overflowY`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- `paddingX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `height`
- type: `ResponsiveValue | undefined`
- `maxHeight`
- type: `ResponsiveValue | undefined`
- `minHeight`
- type: `ResponsiveValue | undefined`
- `justifyContent`
- type: `"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | undefined`
- `alignItems`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `bg`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- description: Shorthand for \`background\`.
- `background`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- `bgGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- description: Shorthand for \`backgroundGradient\`.
- `backgroundGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- `bgGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: Shorthand for \`backgroundGradientDirection\`. e.g. \`43deg\`
- `backgroundGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: e.g. \`43deg\`
- `borderColor`
- type: `(string & {}) | ScopedColorPalette | ScopedColorStroke | undefined`
- `borderWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderTopWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRightWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderBottomWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderLeftWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderTopLeftRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderTopRightRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderBottomRightRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderBottomLeftRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `boxShadow`
- type: `(string & {}) | "s1" | "s2" | "s3" | undefined`
- `minWidth`
- type: `ResponsiveValue | undefined`
- `maxWidth`
- type: `ResponsiveValue | undefined`
- `top`
- type: `0 | (string & {}) | undefined`
- `left`
- type: `0 | (string & {}) | undefined`
- `right`
- type: `0 | (string & {}) | undefined`
- `bottom`
- type: `0 | (string & {}) | undefined`
- `padding`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `p`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`padding\`.
- `px`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingX\`.
- `paddingY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `py`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingY\`.
- `paddingTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- `pt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- description: Shorthand for \`paddingTop\`.
- `paddingRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `pr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingRight\`.
- `paddingBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- `pb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- description: Shorthand for \`paddingBottom\`.
- `paddingLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `pl`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingLeft\`.
- `zIndex`
- type: `number | (string & {}) | undefined`
- `flexShrink`
- type: `true | 0 | (number & {}) | undefined`
- description: If true, flex-shrink will be set to \`1\`.
- `flexWrap`
- type: `true | "wrap" | "wrap-reverse" | "nowrap" | undefined`
- description: If true, flex-wrap will be set to \`wrap\`.
- `justifySelf`
- type: `"center" | "stretch" | "start" | "end" | undefined`
- description: In flexbox layout, this property is ignored.
- `alignContent`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `alignSelf`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `gap`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `gridColumn`
- type: `string | undefined`
- `gridRow`
- type: `string | undefined`
- `unstable_transform`
- type: `string | undefined`
- `_active`
- type: `{ bg?: ScopedColorBg | ScopedColorPalette | (string & {}); background?: ScopedColorBg | ScopedColorPalette | (string & {}); } | undefined`
- `as`
- type: `React.ElementType | undefined`
- `hideFrom`
- type: `BreakpointThreshold | undefined`
- `width`
- type: `"content" | ResponsiveValue<(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
---
file: components/(deprecated)/control-chip.mdx
# Control Chip
더 이상 사용되지 않습니다. [Chip](/react/components/chip)의 `Chip.Toggle` 또는 `Chip.Button`을 사용하세요.
## Preview
```tsx
import { ControlChip } from "seed-design/ui/control-chip";
export default function ControlChipPreview() {
return 라벨;
}
```
## Installation \[#installation]
- npm: npx @seed-design/cli@latest add ui:control-chip
- pnpm: pnpm dlx @seed-design/cli@latest add ui:control-chip
- yarn: yarn dlx @seed-design/cli@latest add ui:control-chip
- bun: bun x @seed-design/cli@latest add ui:control-chip
## Props \[#props]
### ControlChip.Button \[#controlchipbutton]
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
- `size`
- type: `"small" | "medium" | undefined`
- default: `"medium"`
- `layout`
- type: `"withText" | "iconOnly" | undefined`
- default: `"withText"`
### ControlChip.Toggle \[#controlchiptoggle]
- `inputProps`
- type: `React.InputHTMLAttributes | undefined`
- `rootRef`
- type: `React.Ref | undefined`
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
- `size`
- type: `"small" | "medium" | undefined`
- default: `"medium"`
- `layout`
- type: `"withText" | "iconOnly" | undefined`
- default: `"withText"`
- `disabled`
- type: `boolean | undefined`
- `invalid`
- type: `boolean | undefined`
- `required`
- type: `boolean | undefined`
- `checked`
- type: `boolean | undefined`
- `defaultChecked`
- type: `boolean | undefined`
- `onCheckedChange`
- type: `((checked: boolean) => void) | undefined`
- `indeterminate`
- type: `boolean | undefined`
### ControlChip.RadioRoot \[#controlchipradioroot]
- `disabled`
- type: `boolean | undefined`
- default: `false`
- `invalid`
- type: `boolean | undefined`
- default: `false`
- `name`
- type: `string | undefined`
- `form`
- type: `string | undefined`
- `value`
- type: `string | undefined`
- `defaultValue`
- type: `string | undefined`
- `onValueChange`
- type: `((value: string) => void) | undefined`
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### ControlChip.RadioItem \[#controlchipradioitem]
- `inputProps`
- type: `React.InputHTMLAttributes | undefined`
- `rootRef`
- type: `React.Ref | undefined`
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
- `size`
- type: `"small" | "medium" | undefined`
- default: `"medium"`
- `layout`
- type: `"withText" | "iconOnly" | undefined`
- default: `"withText"`
- `value`
- type: `string`
- required: `true`
- `disabled`
- type: `boolean | undefined`
## Examples \[#examples]
### Medium \[#medium]
```tsx
import { ControlChip } from "seed-design/ui/control-chip";
export default function ActionChipMedium() {
return 라벨;
}
```
### Small \[#small]
```tsx
import { ControlChip } from "seed-design/ui/control-chip";
export default function ActionChipSmall() {
return 라벨;
}
```
### Icon Only \[#icon-only]
```tsx
import { IconPlusFill } from "@karrotmarket/react-monochrome-icon";
import { Icon } from "@seed-design/react";
import { ControlChip } from "seed-design/ui/control-chip";
export default function ControlChipIconOnly() {
return (
} />
);
}
```
### Prefix Icon \[#prefix-icon]
```tsx
import { IconPlusFill } from "@karrotmarket/react-monochrome-icon";
import { PrefixIcon } from "@seed-design/react";
import { ControlChip } from "seed-design/ui/control-chip";
export default function ControlChipPrefixIcon() {
return (
} />
라벨
);
}
```
### Suffix Icon \[#suffix-icon]
```tsx
import { IconChevronDownFill } from "@karrotmarket/react-monochrome-icon";
import { SuffixIcon } from "@seed-design/react";
import { ControlChip } from "seed-design/ui/control-chip";
export default function ControlChipSuffixIcon() {
return (
라벨
} />
);
}
```
---
file: components/(deprecated)/error-state.mdx
# Error State
사용자에게 오류 혹은 조회 결과가 없음을 알리는 컴포넌트입니다.
더 이상 사용되지 않습니다. [`ResultSection`](/react/components/result-section)을 사용하세요.
## Preview
```tsx
import { VStack } from "@seed-design/react";
import { ErrorState } from "seed-design/ui/error-state";
export default function ErrorStatePreview() {
return (
);
}
```
## Installation \[#installation]
- npm: npx @seed-design/cli@latest add ui:error-state
- pnpm: pnpm dlx @seed-design/cli@latest add ui:error-state
- yarn: yarn dlx @seed-design/cli@latest add ui:error-state
- bun: bun x @seed-design/cli@latest add ui:error-state
## Props \[#props]
- `title`
- type: `React.ReactNode`
- `description`
- type: `React.ReactNode`
- required: `true`
- `primaryActionProps`
- type: `ActionButtonProps | undefined`
- `secondaryActionProps`
- type: `ActionButtonProps | undefined`
- `variant`
- type: `"default" | "basement" | undefined`
- default: `"default"`
## Examples \[#examples]
### Basement \[#basement]
layer-basement 배경 위에서는 basement variant를 사용합니다.
```tsx
import { VStack } from "@seed-design/react";
import { ErrorState } from "seed-design/ui/error-state";
export default function ErrorStateBasement() {
return (
);
}
```
---
file: components/(deprecated)/extended-action-sheet.mdx
# Extended Action Sheet
더 이상 사용되지 않습니다. [Swipeable Menu Sheet](/react/components/swipeable-menu-sheet)을 사용하세요.
## Preview
```tsx
import { IconEyeSlashLine } from "@karrotmarket/react-monochrome-icon";
import { PrefixIcon } from "@seed-design/react";
import { ActionButton } from "seed-design/ui/action-button";
import {
ExtendedActionSheetContent,
ExtendedActionSheetGroup,
ExtendedActionSheetItem,
ExtendedActionSheetRoot,
ExtendedActionSheetTrigger,
} from "seed-design/ui/extended-action-sheet";
const ExtendedActionSheetPreview = () => {
return (
Open} />
Action 1
} />
Action 2
} />
Action 3
} />
Action 4
} />
Action 5
);
};
export default ExtendedActionSheetPreview;
```
## Installation \[#installation]
- npm: npx @seed-design/cli@latest add ui:extended-action-sheet
- pnpm: pnpm dlx @seed-design/cli@latest add ui:extended-action-sheet
- yarn: yarn dlx @seed-design/cli@latest add ui:extended-action-sheet
- bun: bun x @seed-design/cli@latest add ui:extended-action-sheet
## Props \[#props]
### `ExtendedActionSheetRoot` \[#extendedactionsheetroot]
- `lazyMount`
- type: `boolean | undefined`
- default: `true`
- description: Whether to enable lazy mounting
- `unmountOnExit`
- type: `boolean | undefined`
- default: `true`
- description: Whether to unmount on exit.
- `children`
- type: `React.ReactNode`
- required: `true`
- `role`
- type: `"alertdialog" | "dialog" | undefined`
- default: `"dialog"`
- description: The role of the dialog.
- `modal`
- type: `boolean | undefined`
- default: `true`
- description: Whether the dialog should behave as a modal overlay. When true, focus is trapped, background content is hidden from assistive technology, and \`aria-modal\` is set. Set to \`false\` to temporarily suspend modal behavior (e.g., when a Stackflow Activity is pushed on top of a mounted dialog).
- `closeOnInteractOutside`
- type: `boolean | undefined`
- default: `true`
- description: Whether to close the dialog when the outside is clicked
- `closeOnEscape`
- type: `boolean | undefined`
- default: `true`
- description: Whether to close the dialog when the escape key is pressed
- `open`
- type: `boolean | undefined`
- `defaultOpen`
- type: `boolean | undefined`
- `onOpenChange`
- type: `((open: boolean, details?: DialogChangeDetails) => void) | undefined`
### `ExtendedActionSheetTrigger` \[#extendedactionsheettrigger]
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### `ExtendedActionSheetContent` \[#extendedactionsheetcontent]
- `title`
- type: `React.ReactNode`
- `layerIndex`
- type: `number | undefined`
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### `ExtendedActionSheetGroup` \[#extendedactionsheetgroup]
### `ExtendedActionSheetItem` \[#extendedactionsheetitem]
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
- `tone`
- type: `"critical" | "neutral" | undefined`
- default: `"neutral"`
---
file: components/(deprecated)/extended-fab.mdx
# Extended FAB
더 이상 사용되지 않습니다. [Contextual Floating Button](/react/components/contextual-floating-button)을 사용하세요.
## Preview
```tsx
import { IconBellFill } from "@karrotmarket/react-monochrome-icon";
import { ExtendedFab, PrefixIcon } from "@seed-design/react";
export default function ExtendedFabPreview() {
return (
} />
알림 설정
);
}
```
## Usage \[#usage]
```tsx
import { ExtendedFab, PrefixIcon } from "@seed-design/react";
import { IconPlusLine } from "@karrotmarket/react-monochrome-icon";
```
```tsx
} />
라벨
```
## Props \[#props]
- `variant`
- type: `"layerFloating" | "neutralSolid" | undefined`
- default: `"neutralSolid"`
- `size`
- type: `"small" | "medium" | undefined`
- default: `"medium"`
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
## Examples \[#examples]
### Medium \[#medium]
```tsx
import { IconBellFill } from "@karrotmarket/react-monochrome-icon";
import { ExtendedFab, PrefixIcon } from "@seed-design/react";
export default function ExtendedFabMedium() {
return (
} />
알림 설정
);
}
```
### Small \[#small]
```tsx
import { IconBellFill } from "@karrotmarket/react-monochrome-icon";
import { ExtendedFab, PrefixIcon } from "@seed-design/react";
export default function ExtendedFabSmall() {
return (
} />
알림 설정
);
}
```
### Neutral Solid \[#neutral-solid]
```tsx
import { IconBellFill } from "@karrotmarket/react-monochrome-icon";
import { ExtendedFab, PrefixIcon } from "@seed-design/react";
export default function ExtendedFabNeutralSolid() {
return (
} />
알림 설정
);
}
```
### Layer Floating \[#layer-floating]
```tsx
import { IconBellFill } from "@karrotmarket/react-monochrome-icon";
import { ExtendedFab, PrefixIcon } from "@seed-design/react";
export default function ExtendedFabLayerFloating() {
return (
} />
알림 설정
);
}
```
---
file: components/(deprecated)/fab.mdx
# FAB
더 이상 사용되지 않습니다. [Contextual Floating Button](/react/components/contextual-floating-button)을 사용하세요.
## Preview
```tsx
import IconPlusLine from "@karrotmarket/react-monochrome-icon/IconPlusLine";
import { Fab, Icon } from "@seed-design/react";
export default function FabPreview() {
return (
} />
);
}
```
## Usage \[#usage]
```tsx
import { Fab, Icon } from "@seed-design/react";
import { IconPlusLine } from "@karrotmarket/react-monochrome-icon";
```
```tsx
} />
```
## Props \[#props]
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
---
file: components/(deprecated)/inline-banner.mdx
# Inline Banner
더 이상 사용되지 않습니다. [Page Banner](/react/components/page-banner)를 사용하세요.
## Preview
```tsx
import { VStack } from "@seed-design/react";
import {
ActionableInlineBanner,
DismissibleInlineBanner,
InlineBanner,
} from "seed-design/ui/inline-banner";
export default function InlineBannerPreview() {
return (
);
}
```
## Installation \[#installation]
- npm: npx @seed-design/cli@latest add ui:inline-banner
- pnpm: pnpm dlx @seed-design/cli@latest add ui:inline-banner
- yarn: yarn dlx @seed-design/cli@latest add ui:inline-banner
- bun: bun x @seed-design/cli@latest add ui:inline-banner
## Props \[#props]
### `InlineBanner` \[#inlinebanner]
- `prefixIcon`
- type: `React.ReactNode`
- `title`
- type: `React.ReactNode`
- `description`
- type: `React.ReactNode`
- required: `true`
- `linkProps`
- type: `SeedInlineBanner.LinkProps | undefined`
- `variant`
- type: `"criticalSolid" | "criticalWeak" | "informativeWeak" | "neutralWeak" | "positiveWeak" | "warningSolid" | "warningWeak" | undefined`
- default: `"neutralWeak"`
### `ActionableInlineBanner` \[#actionableinlinebanner]
- `prefixIcon`
- type: `React.ReactNode`
- `title`
- type: `React.ReactNode`
- `description`
- type: `React.ReactNode`
- required: `true`
- `variant`
- type: `"criticalSolid" | "criticalWeak" | "informativeWeak" | "neutralWeak" | "positiveWeak" | "warningSolid" | "warningWeak" | undefined`
- default: `"neutralWeak"`
### `DismissibleInlineBanner` \[#dismissibleinlinebanner]
- `prefixIcon`
- type: `React.ReactNode`
- `title`
- type: `React.ReactNode`
- `description`
- type: `React.ReactNode`
- required: `true`
- `variant`
- type: `"informativeWeak" | "neutralWeak" | "positiveWeak" | "warningSolid" | "warningWeak" | undefined`
- `open`
- type: `boolean | undefined`
- `defaultOpen`
- type: `boolean | undefined`
- `onDismiss`
- type: `(() => void) | undefined`
## Examples \[#examples]
### Content Layout \[#content-layout]
#### With Link Label \[#with-link-label]
`linkProps` prop은 `InlineBanner`에서만 제공돼요.
```tsx
import { InlineBanner } from "seed-design/ui/inline-banner";
export default function InlineBannerWithLinkLabel() {
return (
);
}
```
#### Text Only \[#text-only]
```tsx
import { VStack } from "@seed-design/react";
import {
ActionableInlineBanner,
DismissibleInlineBanner,
InlineBanner,
} from "seed-design/ui/inline-banner";
export default function InlineBannerTextOnly() {
return (
);
}
```
#### With Icon \[#with-icon]
```tsx
import { IconBellFill } from "@karrotmarket/react-monochrome-icon";
import { VStack } from "@seed-design/react";
import {
ActionableInlineBanner,
DismissibleInlineBanner,
InlineBanner,
} from "seed-design/ui/inline-banner";
export default function InlineBannerWithIcon() {
return (
} description="사업자 정보를 등록해주세요." />
}
description="사업자 정보를 등록해주세요."
/>
}
description="사업자 정보를 등록해주세요."
/>
);
}
```
#### With Title Text \[#with-title-text]
```tsx
import { VStack } from "@seed-design/react";
import {
ActionableInlineBanner,
DismissibleInlineBanner,
InlineBanner,
} from "seed-design/ui/inline-banner";
export default function InlineBannerWithTitleText() {
return (
);
}
```
#### With All \[#with-all]
```tsx
import { IconBellFill } from "@karrotmarket/react-monochrome-icon";
import { VStack } from "@seed-design/react";
import {
ActionableInlineBanner,
DismissibleInlineBanner,
InlineBanner,
} from "seed-design/ui/inline-banner";
export default function InlineBannerWithAll() {
return (
}
title="타이틀"
description="사업자 정보를 등록해주세요."
/>
}
title="타이틀"
description="사업자 정보를 등록해주세요."
/>
}
title="타이틀"
description="사업자 정보를 등록해주세요."
/>
);
}
```
### Customizable Parts \[#customizable-parts]
#### Rendering `LinkInlineBanner`’s Link Label as Child \[#rendering-linkinlinebanners-link-label-as-child]
```tsx
import { InlineBanner } from "seed-design/ui/inline-banner";
export default function InlineBannerLinkLabelAsChild() {
return (
자세히 보기
),
}}
/>
);
}
```
### Variants \[#variants]
#### Neutral Weak (Default) \[#neutral-weak-default]
```tsx
import { IconBellFill } from "@karrotmarket/react-monochrome-icon";
import { VStack } from "@seed-design/react";
import {
ActionableInlineBanner,
DismissibleInlineBanner,
InlineBanner,
} from "seed-design/ui/inline-banner";
export default function InlineBannerNeutralWeak() {
return (
}
description="사업자 정보를 등록해주세요."
/>
}
description="사업자 정보를 등록해주세요."
/>
}
description="사업자 정보를 등록해주세요."
/>
);
}
```
#### Positive Weak \[#positive-weak]
```tsx
import { IconCheckmarkCircleFill } from "@karrotmarket/react-monochrome-icon";
import { VStack } from "@seed-design/react";
import {
ActionableInlineBanner,
DismissibleInlineBanner,
InlineBanner,
} from "seed-design/ui/inline-banner";
export default function InlineBannerPositiveWeak() {
return (
}
description="사업자 정보를 등록해주세요."
/>
}
description="사업자 정보를 등록해주세요."
/>
}
description="사업자 정보를 등록해주세요."
/>
);
}
```
#### Informative Weak \[#informative-weak]
```tsx
import { IconILowercaseSerifCircleFill } from "@karrotmarket/react-monochrome-icon";
import { VStack } from "@seed-design/react";
import {
ActionableInlineBanner,
DismissibleInlineBanner,
InlineBanner,
} from "seed-design/ui/inline-banner";
export default function InlineBannerInformativeWeak() {
return (
}
description="사업자 정보를 등록해주세요."
/>
}
description="사업자 정보를 등록해주세요."
/>
}
description="사업자 정보를 등록해주세요."
/>
);
}
```
#### Warning Weak \[#warning-weak]
```tsx
import { IconExclamationmarkCircleFill } from "@karrotmarket/react-monochrome-icon";
import { VStack } from "@seed-design/react";
import {
ActionableInlineBanner,
DismissibleInlineBanner,
InlineBanner,
} from "seed-design/ui/inline-banner";
export default function InlineBannerWarningWeak() {
return (
}
description="사업자 정보를 등록해주세요."
/>
}
description="사업자 정보를 등록해주세요."
/>
}
description="사업자 정보를 등록해주세요."
/>
);
}
```
#### Warning Solid \[#warning-solid]
```tsx
import { IconExclamationmarkCircleFill } from "@karrotmarket/react-monochrome-icon";
import { VStack } from "@seed-design/react";
import {
ActionableInlineBanner,
DismissibleInlineBanner,
InlineBanner,
} from "seed-design/ui/inline-banner";
export default function InlineBannerWarningSolid() {
return (
}
description="사업자 정보를 등록해주세요."
/>
}
description="사업자 정보를 등록해주세요."
/>
}
description="사업자 정보를 등록해주세요."
/>
);
}
```
#### Critical Weak \[#critical-weak]
```tsx
import { IconExclamationmarkCircleFill } from "@karrotmarket/react-monochrome-icon";
import { VStack } from "@seed-design/react";
import { ActionableInlineBanner, InlineBanner } from "seed-design/ui/inline-banner";
export default function InlineBannerCriticalWeak() {
return (
}
description="사업자 정보를 등록해주세요."
/>
}
description="사업자 정보를 등록해주세요."
/>
);
}
```
#### Critical Solid \[#critical-solid]
`criticalWeak`과 `criticalSolid` variant는 `InlineBanner`와 `ActionableInlineBanner`에서만 제공돼요.
variant가 `criticalWeak`이나 `criticalSolid`인 경우 `position: sticky` 등을 활용하여 화면을 스크롤했을 때도 인라인 배너가 상단에 고정되도록 해 주세요.
```tsx
import { ActionableInlineBanner, InlineBanner } from "seed-design/ui/inline-banner";
import { IconExclamationmarkCircleFill } from "@karrotmarket/react-monochrome-icon";
import { VStack } from "@seed-design/react";
export default function InlineBannerCriticalSolid() {
return (
}
description="사업자 정보를 등록해주세요."
/>
}
description="사업자 정보를 등록해주세요."
/>
);
}
```
---
file: components/(deprecated)/inline.mdx
# Inline
인라인 레이아웃을 구성합니다. 디자인 토큰을 JSX에서 사용할 수 있도록 도와줍니다.
더 이상 사용되지 않습니다. [`HStack`](/react/components/layout/h-stack)과 `wrap` prop을 사용하세요.
## Preview
```tsx
import { Box, Inline } from "@seed-design/react";
/**
* @deprecated Use `HStack` instead.
*/
export default function InlinePreview() {
return (
1
2
3
);
}
```
## Usage \[#usage]
```tsx
import { Inline } from "@seed-design/react";
```
```tsx
```
## Props \[#props]
- `asChild`
- type: `boolean | undefined`
- `color`
- type: `(string & {}) | ScopedColorFg | ScopedColorPalette | undefined`
- `margin`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Margin on all four sides. Cannot be combined with any \`bleed\*\` prop.
- `m`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`margin\`. Cannot be combined with any \`bleed\*\` prop.
- `marginX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Horizontal margin (left + right). Cannot be combined with any \`bleed\*\` prop.
- `mx`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginX\`. Cannot be combined with any \`bleed\*\` prop.
- `marginY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Vertical margin (top + bottom). Cannot be combined with any \`bleed\*\` prop.
- `my`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginY\`. Cannot be combined with any \`bleed\*\` prop.
- `marginTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Top margin. Cannot be combined with any \`bleed\*\` prop.
- `mt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginTop\`. Cannot be combined with any \`bleed\*\` prop.
- `marginRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Right margin. Cannot be combined with any \`bleed\*\` prop.
- `mr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginRight\`. Cannot be combined with any \`bleed\*\` prop.
- `marginBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Bottom margin. Cannot be combined with any \`bleed\*\` prop.
- `mb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginBottom\`. Cannot be combined with any \`bleed\*\` prop.
- `marginLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Left margin. Cannot be combined with any \`bleed\*\` prop.
- `ml`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginLeft\`. Cannot be combined with any \`bleed\*\` prop.
- `bleed`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative margin on all four sides to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedX`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative x-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedY`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative y-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedTop`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative top margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedRight`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative right margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedBottom`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative bottom margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedLeft`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative left margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `flexGrow`
- type: `true | 0 | 1 | (number & {}) | undefined`
- description: If true, flex-grow will be set to \`1\`.
- `position`
- type: `"fixed" | "relative" | "absolute" | "sticky" | undefined`
- `overflowX`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- `overflowY`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- `paddingX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `height`
- type: `ResponsiveValue | undefined`
- `maxHeight`
- type: `ResponsiveValue | undefined`
- `minHeight`
- type: `ResponsiveValue | undefined`
- `justifyContent`
- type: `"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | undefined`
- `alignItems`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `bg`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- description: Shorthand for \`background\`.
- `background`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- `bgGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- description: Shorthand for \`backgroundGradient\`.
- `backgroundGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- `bgGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: Shorthand for \`backgroundGradientDirection\`. e.g. \`43deg\`
- `backgroundGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: e.g. \`43deg\`
- `borderColor`
- type: `(string & {}) | ScopedColorPalette | ScopedColorStroke | undefined`
- `borderWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderTopWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRightWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderBottomWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderLeftWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderTopLeftRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderTopRightRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderBottomRightRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderBottomLeftRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `boxShadow`
- type: `(string & {}) | "s1" | "s2" | "s3" | undefined`
- `width`
- type: `ResponsiveValue | undefined`
- `minWidth`
- type: `ResponsiveValue | undefined`
- `maxWidth`
- type: `ResponsiveValue | undefined`
- `top`
- type: `0 | (string & {}) | undefined`
- `left`
- type: `0 | (string & {}) | undefined`
- `right`
- type: `0 | (string & {}) | undefined`
- `bottom`
- type: `0 | (string & {}) | undefined`
- `padding`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `p`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`padding\`.
- `px`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingX\`.
- `paddingY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `py`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingY\`.
- `paddingTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- `pt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- description: Shorthand for \`paddingTop\`.
- `paddingRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `pr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingRight\`.
- `paddingBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- `pb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- description: Shorthand for \`paddingBottom\`.
- `paddingLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `pl`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingLeft\`.
- `zIndex`
- type: `number | (string & {}) | undefined`
- `flexShrink`
- type: `true | 0 | (number & {}) | undefined`
- description: If true, flex-shrink will be set to \`1\`.
- `flexDirection`
- type: `ResponsiveValue<"row" | "column" | "row-reverse" | "column-reverse"> | undefined`
- `justifySelf`
- type: `"center" | "stretch" | "start" | "end" | undefined`
- description: In flexbox layout, this property is ignored.
- `alignContent`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `alignSelf`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `gap`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `gridColumn`
- type: `string | undefined`
- `gridRow`
- type: `string | undefined`
- `unstable_transform`
- type: `string | undefined`
- `_active`
- type: `{ bg?: ScopedColorBg | ScopedColorPalette | (string & {}); background?: ScopedColorBg | ScopedColorPalette | (string & {}); } | undefined`
- `as`
- type: `React.ElementType | undefined`
- `hideFrom`
- type: `BreakpointThreshold | undefined`
---
file: components/(deprecated)/link-content.mdx
# Link Content
더 이상 사용되지 않습니다. [Action Button](/react/components/action-button)에 `variant="ghost"`를 사용하세요.
## Preview
```tsx
import { IconChevronRightLine } from "@karrotmarket/react-monochrome-icon";
import { LinkContent, SuffixIcon } from "@seed-design/react";
export default function LinkContentPreview() {
return (
새 글
} />
);
}
```
## Usage \[#usage]
```tsx
import { LinkContent, SuffixIcon } from "@seed-design/react";
import { IconChevronRightLine } from "@karrotmarket/react-monochrome-icon";
```
```tsx
Label
} />
```
## Props \[#props]
- `weight`
- type: `"bold" | "regular" | undefined`
- default: `"regular"`
- `size`
- type: `"t4" | "t6" | "t5" | undefined`
- default: `"t4"`
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
- `color`
- type: `(string & {}) | ScopedColorFg | ScopedColorPalette | undefined`
## Examples \[#examples]
### Size \[#size]
```tsx
import { IconChevronRightLine } from "@karrotmarket/react-monochrome-icon";
import { LinkContent, SuffixIcon, VStack } from "@seed-design/react";
export default function LinkContentSize() {
return (
추가
} />
추가
} />
추가
} />
);
}
```
### Color \[#color]
```tsx
import { IconChevronRightLine } from "@karrotmarket/react-monochrome-icon";
import { LinkContent, VStack, SuffixIcon } from "@seed-design/react";
export default function LinkContentColor() {
return (
더보기
} />
더보기
} />
더보기
} />
더보기
} />
);
}
```
---
file: components/(deprecated)/menu-sheet.mdx
# Menu Sheet
사용자의 작업과 관련된 선택지를 제공하는 시트 형태의 컴포넌트입니다.
더 이상 사용되지 않습니다. [Swipeable Menu Sheet](/react/components/swipeable-menu-sheet)을 사용하세요.
## Preview
```tsx
import { IconEyeSlashLine } from "@karrotmarket/react-monochrome-icon";
import { ActionButton } from "seed-design/ui/action-button";
import {
MenuSheetContent,
MenuSheetGroup,
MenuSheetItem,
MenuSheetRoot,
MenuSheetTrigger,
} from "seed-design/ui/menu-sheet";
const MenuSheetPreview = () => {
return (
Open}
/>
} />
} />
} />
} tone="critical" />
);
};
export default MenuSheetPreview;
```
Stackflow와 Menu Sheet를 함께 사용하는 방법에 대해 알아보세요.
## Installation \[#installation]
- npm: npx @seed-design/cli@latest add ui:menu-sheet
- pnpm: pnpm dlx @seed-design/cli@latest add ui:menu-sheet
- yarn: yarn dlx @seed-design/cli@latest add ui:menu-sheet
- bun: bun x @seed-design/cli@latest add ui:menu-sheet
## Props \[#props]
### `MenuSheetRoot` \[#menusheetroot]
- `lazyMount`
- type: `boolean | undefined`
- default: `true`
- description: Whether to enable lazy mounting
- `unmountOnExit`
- type: `boolean | undefined`
- default: `true`
- description: Whether to unmount on exit.
- `skipAnimation`
- type: `boolean | undefined`
- default: `false`
- `children`
- type: `React.ReactNode`
- required: `true`
- `role`
- type: `"alertdialog" | "dialog" | undefined`
- default: `"dialog"`
- description: The role of the dialog.
- `modal`
- type: `boolean | undefined`
- default: `true`
- description: Whether the dialog should behave as a modal overlay. When true, focus is trapped, background content is hidden from assistive technology, and \`aria-modal\` is set. Set to \`false\` to temporarily suspend modal behavior (e.g., when a Stackflow Activity is pushed on top of a mounted dialog).
- `closeOnInteractOutside`
- type: `boolean | undefined`
- default: `true`
- description: Whether to close the dialog when the outside is clicked
- `closeOnEscape`
- type: `boolean | undefined`
- default: `true`
- description: Whether to close the dialog when the escape key is pressed
- `open`
- type: `boolean | undefined`
- `defaultOpen`
- type: `boolean | undefined`
- `onOpenChange`
- type: `((open: boolean, details?: DialogChangeDetails) => void) | undefined`
### `MenuSheetTrigger` \[#menusheettrigger]
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### `MenuSheetContent` \[#menusheetcontent]
- `title`
- type: `React.ReactNode`
- `description`
- type: `React.ReactNode`
- `layerIndex`
- type: `number | undefined`
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
- `labelAlign`
- type: `"center" | "left" | undefined`
- default: `"left"`
- description: - \`left\`: 라벨을 왼쪽 정렬합니다. - \`center\`: 라벨을 중앙 정렬합니다.
### `MenuSheetGroup` \[#menusheetgroup]
- `labelAlign`
- type: `"center" | "left" | undefined`
- default: `"left"`
- description: - \`left\`: 라벨을 왼쪽 정렬합니다. - \`center\`: 라벨을 중앙 정렬합니다.
### `MenuSheetItem` \[#menusheetitem]
- `prefixIcon`
- type: `React.ReactNode`
- `label`
- type: `React.ReactNode`
- required: `true`
- `description`
- type: `React.ReactNode`
- `tone`
- type: `"critical" | "neutral" | undefined`
- default: `"neutral"`
- description: - \`neutral\`: 일반적인 작업을 수행하는 기본 아이템입니다. - \`critical\`: 데이터 삭제와 같이 되돌릴 수 없는 작업을 수행하는 아이템입니다.
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
- `labelAlign`
- type: `"center" | "left" | undefined`
- default: `"left"`
- description: - \`left\`: 라벨을 왼쪽 정렬합니다. - \`center\`: 라벨을 중앙 정렬합니다.
## Examples \[#examples]
### Trigger \[#trigger]
``는 `aria-haspopup="dialog"` 속성을 설정하고, MenuSheet의 `open` 상태에 따라 `aria-expanded` 속성을 자동으로 설정합니다. 이 속성은 스크린 리더와 같은 보조 기술에 유용합니다.
## Preview
```tsx
import { IconEyeSlashLine } from "@karrotmarket/react-monochrome-icon";
import { ActionButton } from "seed-design/ui/action-button";
import {
MenuSheetContent,
MenuSheetGroup,
MenuSheetItem,
MenuSheetRoot,
MenuSheetTrigger,
} from "seed-design/ui/menu-sheet";
const MenuSheetPreview = () => {
return (
Open}
/>
} />
} />
} />
} tone="critical" />
);
};
export default MenuSheetPreview;
```
### With Title \[#with-title]
`MenuSheetContent`의 `title` prop을 사용하여 시트 헤더에 제목을 표시합니다.
```tsx
import { IconEyeSlashLine } from "@karrotmarket/react-monochrome-icon";
import { ActionButton } from "seed-design/ui/action-button";
import {
MenuSheetContent,
MenuSheetGroup,
MenuSheetItem,
MenuSheetRoot,
MenuSheetTrigger,
} from "seed-design/ui/menu-sheet";
const MenuSheetWithTitle = () => {
return (
Open} />
}
description="Ut nulla et id dolor labore ullamco irure est id occaecat."
/>
}
description="Ut nulla et id dolor labore ullamco irure est id occaecat."
/>
} />
} tone="critical" />
);
};
export default MenuSheetWithTitle;
```
### With Title and Description \[#with-title-and-description]
`MenuSheetContent`의 `description` prop을 사용하여 제목 아래에 부가 설명을 추가합니다.
```tsx
import { IconEyeSlashLine } from "@karrotmarket/react-monochrome-icon";
import { ActionButton } from "seed-design/ui/action-button";
import {
MenuSheetContent,
MenuSheetGroup,
MenuSheetItem,
MenuSheetRoot,
MenuSheetTrigger,
} from "seed-design/ui/menu-sheet";
export default function MenuSheetWithTitleAndDescription() {
return (
Open} />
}
description="Ut nulla et id dolor labore ullamco irure est id occaecat."
/>
}
description="Ut nulla et id dolor labore ullamco irure est id occaecat."
/>
} />
} tone="critical" />
);
}
```
### Label Align \[#label-align]
`MenuSheetContent`의 `labelAlign` prop으로 메뉴 항목의 레이블 정렬을 설정합니다.
#### `labelAlign="left"` (with `PrefixIcon`) \[#labelalignleft-with-prefixicon]
레이블을 왼쪽 정렬합니다.
```tsx
import { IconEyeSlashLine } from "@karrotmarket/react-monochrome-icon";
import { ActionButton } from "seed-design/ui/action-button";
import {
MenuSheetContent,
MenuSheetGroup,
MenuSheetItem,
MenuSheetRoot,
MenuSheetTrigger,
} from "seed-design/ui/menu-sheet";
const MenuSheetWithPrefixIcon = () => {
return (
Open} />
} />
} />
} />
} tone="critical" />
);
};
export default MenuSheetWithPrefixIcon;
```
#### `labelAlign="center"` (without `PrefixIcon`) \[#labelaligncenter-without-prefixicon]
레이블을 중앙 정렬합니다. (일반적으로, `prefixIcon` 없는 경우)
```tsx
import { ActionButton } from "seed-design/ui/action-button";
import {
MenuSheetContent,
MenuSheetGroup,
MenuSheetItem,
MenuSheetRoot,
MenuSheetTrigger,
} from "seed-design/ui/menu-sheet";
const MenuSheetWithoutPrefixIcon = () => {
return (
Open
);
};
export default MenuSheetWithoutPrefixIcon;
```
#### Overriding `labelAlign` \[#overriding-labelalign]
필요한 경우 `MenuSheetContent`에 지정한 `labelAlign`을 `MenuSheetGroup` 또는 `MenuSheetItem`에 지정한 `labelAlign`으로 덮어쓸 수 있습니다.
```tsx
import { ActionButton } from "seed-design/ui/action-button";
import {
MenuSheetContent,
MenuSheetGroup,
MenuSheetItem,
MenuSheetRoot,
MenuSheetTrigger,
} from "seed-design/ui/menu-sheet";
const MenuSheetOverridingLabelAlign = () => {
return (
Open
);
};
export default MenuSheetOverridingLabelAlign;
```
### `onOpenChange` Details \[#onopenchange-details]
`onOpenChange` 두 번째 인자로 `details`가 제공됩니다.
#### `reason` \[#reason]
**열릴 때** (`open: true`)
- `"trigger"`: `MenuSheetTrigger` (`MenuSheet.Trigger`)로 열림
**닫힐 때** (`open: false`)
- `"closeButton"`: `MenuSheet.CloseButton`으로 닫힘
- `"escapeKeyDown"`: ESC 키 사용
- `"interactOutside"`: 외부 영역 클릭
```tsx
import { IconEyeSlashLine } from "@karrotmarket/react-monochrome-icon";
import { HStack, Text, VStack } from "@seed-design/react";
import { useState } from "react";
import { ActionButton } from "seed-design/ui/action-button";
import {
MenuSheetContent,
MenuSheetGroup,
MenuSheetItem,
MenuSheetRoot,
MenuSheetTrigger,
} from "seed-design/ui/menu-sheet";
export default function MenuSheetOnOpenChangeReason() {
const [open, setOpen] = useState(false);
const [openReason, setOpenReason] = useState(null);
const [closeReason, setCloseReason] = useState(null);
return (
{
setOpen(open);
(open ? setOpenReason : setCloseReason)(details?.reason ?? null);
}}
>
열기} />
} />
} />
마지막 열림 이유: {openReason ?? "-"}
마지막 닫힘 이유: {closeReason ?? "-"}
);
}
```
### Skip Animation \[#skip-animation]
`skipAnimation` prop을 사용하여 MenuSheet의 enter/exit 애니메이션을 건너뛸 수 있습니다.
```tsx
import { IconEyeSlashLine } from "@karrotmarket/react-monochrome-icon";
import { ActionButton } from "seed-design/ui/action-button";
import {
MenuSheetContent,
MenuSheetGroup,
MenuSheetItem,
MenuSheetRoot,
MenuSheetTrigger,
} from "seed-design/ui/menu-sheet";
const MenuSheetSkipAnimation = () => {
return (
Open} />
} />
} />
);
};
export default MenuSheetSkipAnimation;
```
---
file: components/(deprecated)/stack.mdx
# Stack
세로로 쌓이는 레이아웃을 구성합니다. 디자인 토큰을 JSX에서 사용할 수 있도록 도와줍니다.
더 이상 사용되지 않습니다. [`VStack`](/react/components/layout/v-stack) 컴포넌트를 사용하세요.
## Preview
```tsx
import { Box, Stack } from "@seed-design/react";
/**
* @deprecated Use `VStack` instead.
*/
export default function StackPreview() {
return (
1
2
3
);
}
```
## Usage \[#usage]
```tsx
import { Stack } from "@seed-design/react";
```
```tsx
```
## Props \[#props]
- `asChild`
- type: `boolean | undefined`
- `color`
- type: `(string & {}) | ScopedColorFg | ScopedColorPalette | undefined`
- `margin`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Margin on all four sides. Cannot be combined with any \`bleed\*\` prop.
- `m`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`margin\`. Cannot be combined with any \`bleed\*\` prop.
- `marginX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Horizontal margin (left + right). Cannot be combined with any \`bleed\*\` prop.
- `mx`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginX\`. Cannot be combined with any \`bleed\*\` prop.
- `marginY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Vertical margin (top + bottom). Cannot be combined with any \`bleed\*\` prop.
- `my`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginY\`. Cannot be combined with any \`bleed\*\` prop.
- `marginTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Top margin. Cannot be combined with any \`bleed\*\` prop.
- `mt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginTop\`. Cannot be combined with any \`bleed\*\` prop.
- `marginRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Right margin. Cannot be combined with any \`bleed\*\` prop.
- `mr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginRight\`. Cannot be combined with any \`bleed\*\` prop.
- `marginBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Bottom margin. Cannot be combined with any \`bleed\*\` prop.
- `mb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginBottom\`. Cannot be combined with any \`bleed\*\` prop.
- `marginLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Left margin. Cannot be combined with any \`bleed\*\` prop.
- `ml`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginLeft\`. Cannot be combined with any \`bleed\*\` prop.
- `bleed`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative margin on all four sides to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedX`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative x-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedY`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative y-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedTop`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative top margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedRight`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative right margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedBottom`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative bottom margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedLeft`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative left margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `flexGrow`
- type: `true | 0 | 1 | (number & {}) | undefined`
- description: If true, flex-grow will be set to \`1\`.
- `position`
- type: `"fixed" | "relative" | "absolute" | "sticky" | undefined`
- `overflowX`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- `overflowY`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- `direction`
- type: `ResponsiveValue<"row" | "column" | "row-reverse" | "column-reverse"> | undefined`
- description: Shorthand for \`flexDirection\`.
- `paddingX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `height`
- type: `ResponsiveValue | undefined`
- `maxHeight`
- type: `ResponsiveValue | undefined`
- `minHeight`
- type: `ResponsiveValue | undefined`
- `justifyContent`
- type: `"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | undefined`
- `alignItems`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `bg`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- description: Shorthand for \`background\`.
- `background`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- `bgGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- description: Shorthand for \`backgroundGradient\`.
- `backgroundGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- `bgGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: Shorthand for \`backgroundGradientDirection\`. e.g. \`43deg\`
- `backgroundGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: e.g. \`43deg\`
- `borderColor`
- type: `(string & {}) | ScopedColorPalette | ScopedColorStroke | undefined`
- `borderWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderTopWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRightWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderBottomWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderLeftWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderTopLeftRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderTopRightRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderBottomRightRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderBottomLeftRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `boxShadow`
- type: `(string & {}) | "s1" | "s2" | "s3" | undefined`
- `width`
- type: `ResponsiveValue | undefined`
- `minWidth`
- type: `ResponsiveValue | undefined`
- `maxWidth`
- type: `ResponsiveValue | undefined`
- `top`
- type: `0 | (string & {}) | undefined`
- `left`
- type: `0 | (string & {}) | undefined`
- `right`
- type: `0 | (string & {}) | undefined`
- `bottom`
- type: `0 | (string & {}) | undefined`
- `padding`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `p`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`padding\`.
- `px`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingX\`.
- `paddingY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `py`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingY\`.
- `paddingTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- `pt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- description: Shorthand for \`paddingTop\`.
- `paddingRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `pr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingRight\`.
- `paddingBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- `pb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- description: Shorthand for \`paddingBottom\`.
- `paddingLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `pl`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingLeft\`.
- `display`
- type: `ResponsiveValue<"none" | "flex"> | undefined`
- default: `"flex"`
- `zIndex`
- type: `number | (string & {}) | undefined`
- `flexShrink`
- type: `true | 0 | (number & {}) | undefined`
- description: If true, flex-shrink will be set to \`1\`.
- `flexWrap`
- type: `true | "wrap" | "wrap-reverse" | "nowrap" | undefined`
- description: If true, flex-wrap will be set to \`wrap\`.
- `justifySelf`
- type: `"center" | "stretch" | "start" | "end" | undefined`
- description: In flexbox layout, this property is ignored.
- `alignContent`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `alignSelf`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `gap`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `gridColumn`
- type: `string | undefined`
- `gridRow`
- type: `string | undefined`
- `unstable_transform`
- type: `string | undefined`
- `_active`
- type: `{ bg?: ScopedColorBg | ScopedColorPalette | (string & {}); background?: ScopedColorBg | ScopedColorPalette | (string & {}); } | undefined`
- `as`
- type: `React.ElementType | undefined`
- `hideFrom`
- type: `BreakpointThreshold | undefined`
- `wrap`
- type: `true | "wrap" | "wrap-reverse" | "nowrap" | undefined`
- description: Shorthand for \`flexWrap\`.
- `align`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- description: Shorthand for \`alignItems\`.
- `justify`
- type: `"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | undefined`
- description: Shorthand for \`justifyContent\`.
- `grow`
- type: `true | 0 | 1 | (number & {}) | undefined`
- description: Shorthand for \`flexGrow\`.
- `shrink`
- type: `true | 0 | (number & {}) | undefined`
- description: Shorthand for \`flexShrink\`.
---
file: components/(foundation)/iconography/composition.mdx
# Composition
아이콘을 사용하는 방법을 설명합니다.
## 개요 \[#개요]
[당근 아이콘 라이브러리](/docs/foundation/iconography/library)는 디자인 시스템에 독립적(agnostic)으로 설계되었으며 SEED Design의 의견이 포함되어 있지 않습니다. 때로는 라이브러리에 없는 커스텀 아이콘을 사용하면서도 아이콘 합성 패턴을 활용해야 하는 경우가 있습니다.
이를 위해 `svg` 속성을 통해 아이콘을 받아 디자인 시스템에 연결하는 유틸리티 컴포넌트를 제공합니다:
- `Icon`: 아이콘을 독립적으로 사용하거나 아이콘만 표시하는 컴포넌트에서 사용합니다.
- `PrefixIcon`, `SuffixIcon`: 컴포넌트 내에 아이콘과 텍스트를 함께 배치할 때 사용합니다.
## Icon 컴포넌트 \[#icon-컴포넌트]
`Icon` 컴포넌트는 아이콘을 독립적으로 사용하거나 아이콘만 표시하는 컴포넌트에서 사용합니다.
```jsx
import { Icon } from "@seed-design/react";
import { IconHeartFill } from "@karrotmarket/react-monochrome-icon";
// 독립형 아이콘
} />
// 아이콘만 표시하는 버튼
} />
```
## PrefixIcon과 SuffixIcon \[#prefixicon과-suffixicon]
컴포넌트 내에 아이콘과 텍스트를 함께 배치할 때는 `PrefixIcon`, `SuffixIcon` 컴포넌트를 children으로 배치합니다.
```jsx
import { PrefixIcon, SuffixIcon } from "@seed-design/react";
import { ActionButton } from "seed-design/ui/action-button";
import { IconPlusFill, IconChevronRightFill } from "@karrotmarket/react-monochrome-icon";
// 앞에 아이콘 배치
} />
라벨
// 뒤에 아이콘 배치
라벨
} />
// 아이콘 양쪽에 배치
} />
라벨
} />
```
이 패턴은 다음과 같은 컴포넌트에서 일관되게 사용됩니다:
- `ActionButton`: 버튼 내 아이콘 배치
- `Button`: 일반 버튼 내 아이콘 배치
- `ToggleButton`: 토글 버튼 내 아이콘 배치
- `ActionChip`: 액션 칩 내 아이콘 배치
- `ControlChip`: 컨트롤 칩 내 아이콘 배치
---
file: components/(foundation)/iconography/library.mdx
# Library
리액트 아이콘 패키지는 아이콘을 사용할 때 필요한 컴포넌트를 제공합니다.
## Overview \[#overview]
아이콘 라이브러리에 포함된 아이콘을 확인합니다.
## Installation \[#installation]
- npm: npm install @karrotmarket/react-monochrome-icon @karrotmarket/react-multicolor-icon
- pnpm: pnpm add @karrotmarket/react-monochrome-icon @karrotmarket/react-multicolor-icon
- yarn: yarn add @karrotmarket/react-monochrome-icon @karrotmarket/react-multicolor-icon
- bun: bun add @karrotmarket/react-monochrome-icon @karrotmarket/react-multicolor-icon
---
file: components/(foundation)/layout/box.mdx
# Box
Box 컴포넌트는 가장 기초적인 레이아웃 컴포넌트입니다. 디자인 토큰을 JSX에서 사용할 수 있도록 도와줍니다.
## Preview
```tsx
import { Box } from "@seed-design/react";
export default function BoxPreview() {
return (
Box Example
);
}
```
## Usage \[#usage]
```tsx
import { Box } from "@seed-design/react";
```
```tsx
```
## Props \[#props]
- `bg`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- description: Shorthand for \`background\`.
- `background`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- `bgGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- description: Shorthand for \`backgroundGradient\`.
- `backgroundGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- `bgGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: Shorthand for \`backgroundGradientDirection\`. e.g. \`43deg\`
- `backgroundGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: e.g. \`43deg\`
- `color`
- type: `(string & {}) | ScopedColorFg | ScopedColorPalette | undefined`
- `borderColor`
- type: `(string & {}) | ScopedColorPalette | ScopedColorStroke | undefined`
- `borderWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderTopWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRightWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderBottomWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderLeftWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRadius`
- type: `0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefined`
- `borderTopLeftRadius`
- type: `0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefined`
- `borderTopRightRadius`
- type: `0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefined`
- `borderBottomRightRadius`
- type: `0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefined`
- `borderBottomLeftRadius`
- type: `0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefined`
- `boxShadow`
- type: `(string & {}) | "s1" | "s2" | "s3" | undefined`
- `width`
- type: `ResponsiveValue<(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `minWidth`
- type: `ResponsiveValue<(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `maxWidth`
- type: `ResponsiveValue<(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `height`
- type: `ResponsiveValue<(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `minHeight`
- type: `ResponsiveValue<(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `maxHeight`
- type: `ResponsiveValue<(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `top`
- type: `0 | (string & {}) | undefined`
- `left`
- type: `0 | (string & {}) | undefined`
- `right`
- type: `0 | (string & {}) | undefined`
- `bottom`
- type: `0 | (string & {}) | undefined`
- `padding`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `p`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- description: Shorthand for \`padding\`.
- `paddingX`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `px`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- description: Shorthand for \`paddingX\`.
- `paddingY`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `py`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- description: Shorthand for \`paddingY\`.
- `paddingTop`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | "safeArea"> | undefined`
- `pt`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | "safeArea"> | undefined`
- description: Shorthand for \`paddingTop\`.
- `paddingRight`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `pr`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- description: Shorthand for \`paddingRight\`.
- `paddingBottom`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | "safeArea"> | undefined`
- `pb`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | "safeArea"> | undefined`
- description: Shorthand for \`paddingBottom\`.
- `paddingLeft`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `pl`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- description: Shorthand for \`paddingLeft\`.
- `display`
- type: `ResponsiveValue<"grid" | "none" | "block" | "flex" | "inline-flex" | "inline" | "inline-block"> | undefined`
- `position`
- type: `"fixed" | "relative" | "absolute" | "sticky" | undefined`
- `overflowX`
- type: `"visible" | "hidden" | "scroll" | "auto" | undefined`
- `overflowY`
- type: `"visible" | "hidden" | "scroll" | "auto" | undefined`
- `zIndex`
- type: `number | (string & {}) | undefined`
- `flexGrow`
- type: `true | 0 | (number & {}) | 1 | undefined`
- description: If true, flex-grow will be set to \`1\`.
- `flexShrink`
- type: `true | 0 | (number & {}) | undefined`
- description: If true, flex-shrink will be set to \`1\`.
- `flexDirection`
- type: `ResponsiveValue<"row" | "column" | "row-reverse" | "column-reverse"> | undefined`
- `flexWrap`
- type: `true | "wrap" | "wrap-reverse" | "nowrap" | undefined`
- description: If true, flex-wrap will be set to \`wrap\`.
- `justifyContent`
- type: `"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | undefined`
- `justifySelf`
- type: `"center" | "start" | "end" | "stretch" | undefined`
- description: In flexbox layout, this property is ignored.
- `alignItems`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `alignContent`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `alignSelf`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `gap`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `gridColumn`
- type: `string | undefined`
- `gridRow`
- type: `string | undefined`
- `unstable_transform`
- type: `string | undefined`
- `_active`
- type: `{ bg?: ScopedColorBg | ScopedColorPalette | (string & {}); background?: ScopedColorBg | ScopedColorPalette | (string & {}); } | undefined`
- `bleed`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative margin on all four sides to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedX`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative x-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedY`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative y-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedTop`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative top margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedRight`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative right margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedBottom`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative bottom margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedLeft`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative left margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `margin`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Margin on all four sides. Cannot be combined with any \`bleed\*\` prop.
- `m`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`margin\`. Cannot be combined with any \`bleed\*\` prop.
- `marginX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Horizontal margin (left + right). Cannot be combined with any \`bleed\*\` prop.
- `mx`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginX\`. Cannot be combined with any \`bleed\*\` prop.
- `marginY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Vertical margin (top + bottom). Cannot be combined with any \`bleed\*\` prop.
- `my`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginY\`. Cannot be combined with any \`bleed\*\` prop.
- `marginTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Top margin. Cannot be combined with any \`bleed\*\` prop.
- `mt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginTop\`. Cannot be combined with any \`bleed\*\` prop.
- `marginRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Right margin. Cannot be combined with any \`bleed\*\` prop.
- `mr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginRight\`. Cannot be combined with any \`bleed\*\` prop.
- `marginBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Bottom margin. Cannot be combined with any \`bleed\*\` prop.
- `mb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginBottom\`. Cannot be combined with any \`bleed\*\` prop.
- `marginLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Left margin. Cannot be combined with any \`bleed\*\` prop.
- `ml`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginLeft\`. Cannot be combined with any \`bleed\*\` prop.
- `as`
- type: `React.ElementType | undefined`
- `asChild`
- type: `boolean | undefined`
- `hideFrom`
- type: `BreakpointThreshold | undefined`
## Examples \[#examples]
### Gradient \[#gradient]
```tsx
import { Box, VStack } from "@seed-design/react";
export default function BoxGradient() {
return (
Box Gradient
Box Gradient
);
}
```
## Responsive Design \[#responsive-design]
Box의 레이아웃 프로퍼티에 반응형 값을 전달하여 viewport 크기에 따라 스타일을 조정할 수 있습니다.
---
file: components/(foundation)/layout/flex.mdx
# Flex
Flex 컴포넌트는 flexbox를 사용하며 디자인 토큰을 JSX에서 사용할 수 있도록 도와줍니다.
## Preview
```tsx
import { Flex } from "@seed-design/react";
export default function FlexPreview() {
return (
1
2
3
4
5
);
}
```
## Props \[#props]
- `asChild`
- type: `boolean | undefined`
- `color`
- type: `(string & {}) | ScopedColorFg | ScopedColorPalette | undefined`
- `margin`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Margin on all four sides. Cannot be combined with any \`bleed\*\` prop.
- `m`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`margin\`. Cannot be combined with any \`bleed\*\` prop.
- `marginX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Horizontal margin (left + right). Cannot be combined with any \`bleed\*\` prop.
- `mx`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginX\`. Cannot be combined with any \`bleed\*\` prop.
- `marginY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Vertical margin (top + bottom). Cannot be combined with any \`bleed\*\` prop.
- `my`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginY\`. Cannot be combined with any \`bleed\*\` prop.
- `marginTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Top margin. Cannot be combined with any \`bleed\*\` prop.
- `mt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginTop\`. Cannot be combined with any \`bleed\*\` prop.
- `marginRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Right margin. Cannot be combined with any \`bleed\*\` prop.
- `mr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginRight\`. Cannot be combined with any \`bleed\*\` prop.
- `marginBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Bottom margin. Cannot be combined with any \`bleed\*\` prop.
- `mb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginBottom\`. Cannot be combined with any \`bleed\*\` prop.
- `marginLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Left margin. Cannot be combined with any \`bleed\*\` prop.
- `ml`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginLeft\`. Cannot be combined with any \`bleed\*\` prop.
- `bleed`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative margin on all four sides to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedX`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative x-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedY`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative y-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedTop`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative top margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedRight`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative right margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedBottom`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative bottom margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedLeft`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative left margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `flexGrow`
- type: `true | 0 | 1 | (number & {}) | undefined`
- description: If true, flex-grow will be set to \`1\`.
- `position`
- type: `"fixed" | "relative" | "absolute" | "sticky" | undefined`
- `overflowX`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- `overflowY`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- `paddingX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `height`
- type: `ResponsiveValue | undefined`
- `maxHeight`
- type: `ResponsiveValue | undefined`
- `minHeight`
- type: `ResponsiveValue | undefined`
- `justifyContent`
- type: `"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | undefined`
- `alignItems`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `bg`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- description: Shorthand for \`background\`.
- `background`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- `bgGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- description: Shorthand for \`backgroundGradient\`.
- `backgroundGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- `bgGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: Shorthand for \`backgroundGradientDirection\`. e.g. \`43deg\`
- `backgroundGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: e.g. \`43deg\`
- `borderColor`
- type: `(string & {}) | ScopedColorPalette | ScopedColorStroke | undefined`
- `borderWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderTopWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRightWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderBottomWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderLeftWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderTopLeftRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderTopRightRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderBottomRightRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderBottomLeftRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `boxShadow`
- type: `(string & {}) | "s1" | "s2" | "s3" | undefined`
- `width`
- type: `ResponsiveValue | undefined`
- `minWidth`
- type: `ResponsiveValue | undefined`
- `maxWidth`
- type: `ResponsiveValue | undefined`
- `top`
- type: `0 | (string & {}) | undefined`
- `left`
- type: `0 | (string & {}) | undefined`
- `right`
- type: `0 | (string & {}) | undefined`
- `bottom`
- type: `0 | (string & {}) | undefined`
- `padding`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `p`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`padding\`.
- `px`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingX\`.
- `paddingY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `py`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingY\`.
- `paddingTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- `pt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- description: Shorthand for \`paddingTop\`.
- `paddingRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `pr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingRight\`.
- `paddingBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- `pb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- description: Shorthand for \`paddingBottom\`.
- `paddingLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `pl`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingLeft\`.
- `zIndex`
- type: `number | (string & {}) | undefined`
- `flexShrink`
- type: `true | 0 | (number & {}) | undefined`
- description: If true, flex-shrink will be set to \`1\`.
- `flexDirection`
- type: `ResponsiveValue<"row" | "column" | "row-reverse" | "column-reverse"> | undefined`
- `flexWrap`
- type: `true | "wrap" | "wrap-reverse" | "nowrap" | undefined`
- description: If true, flex-wrap will be set to \`wrap\`.
- `justifySelf`
- type: `"center" | "stretch" | "start" | "end" | undefined`
- description: In flexbox layout, this property is ignored.
- `alignContent`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `alignSelf`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `gap`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `gridColumn`
- type: `string | undefined`
- `gridRow`
- type: `string | undefined`
- `unstable_transform`
- type: `string | undefined`
- `_active`
- type: `{ bg?: ScopedColorBg | ScopedColorPalette | (string & {}); background?: ScopedColorBg | ScopedColorPalette | (string & {}); } | undefined`
- `as`
- type: `React.ElementType | undefined`
- `hideFrom`
- type: `BreakpointThreshold | undefined`
- `display`
- type: `ResponsiveValue<"none" | "flex"> | undefined`
- default: `"flex"`
- `direction`
- type: `ResponsiveValue<"row" | "column" | "row-reverse" | "column-reverse"> | undefined`
- description: Shorthand for \`flexDirection\`.
- `wrap`
- type: `true | "wrap" | "wrap-reverse" | "nowrap" | undefined`
- description: Shorthand for \`flexWrap\`.
- `align`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- description: Shorthand for \`alignItems\`.
- `justify`
- type: `"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | undefined`
- description: Shorthand for \`justifyContent\`.
- `grow`
- type: `true | 0 | (number & {}) | 1 | undefined`
- description: Shorthand for \`flexGrow\`.
- `shrink`
- type: `true | 0 | (number & {}) | undefined`
- description: Shorthand for \`flexShrink\`.
## Responsive Design \[#responsive-design]
Flex의 레이아웃 프로퍼티에 반응형 값을 전달하여 viewport 크기에 따라 스타일을 조정할 수 있습니다.
---
file: components/(foundation)/layout/float.mdx
# Float
Float 컴포넌트는 특정 위치에 고정된 요소를 배치할 때 사용합니다.
## Preview
```tsx
import { Box, Float } from "@seed-design/react";
import { ContextualFloatingButton } from "seed-design/ui/contextual-floating-button";
export default function FloatPreview() {
return (
Top StartTop CenterTop EndMiddle StartMiddle CenterMiddle EndBottom StartBottom CenterBottom End
);
}
```
## Props \[#props]
- `as`
- type: `React.ElementType | undefined`
- `placement`
- type: `"bottom-end" | "bottom-start" | "top-end" | "top-start" | "bottom-center" | "top-center" | "middle-center" | "middle-end" | "middle-start"`
- required: `true`
- `offsetX`
- type: `0 | Dimension | (string & {}) | undefined`
- default: `0`
- `offsetY`
- type: `0 | Dimension | (string & {}) | undefined`
- default: `0`
- `zIndex`
- type: `number | (string & {}) | undefined`
## Examples \[#examples]
### Offset X \[#offset-x]
`offsetX` 속성을 사용하면 좌우 방향으로 위치를 조정할 수 있습니다.
`start`, `middle`에서는 우측 방향으로 조정되고, `end`에서는 좌측 방향으로 조정됩니다.
```tsx
import { Box, Float } from "@seed-design/react";
import { ContextualFloatingButton } from "seed-design/ui/contextual-floating-button";
export default function FloatOffsetX() {
return (
Middle StartMiddle CenterMiddle End
);
}
```
### Offset Y \[#offset-y]
`offsetY` 속성을 사용하면 상하 방향으로 위치를 조정할 수 있습니다.
`top`, `middle`에서는 하측 방향으로 조정되고, `bottom`에서는 상측 방향으로 조정됩니다.
```tsx
import { Box, Float } from "@seed-design/react";
import { ContextualFloatingButton } from "seed-design/ui/contextual-floating-button";
export default function FloatOffsetY() {
return (
Top CenterMiddle CenterBottom Center
);
}
```
---
file: components/(foundation)/layout/grid.mdx
# Grid
Grid 컴포넌트는 CSS Grid를 사용하며 디자인 토큰을 JSX에서 사용할 수 있도록 도와줍니다.
## Preview
```tsx
import { Flex, Grid } from "@seed-design/react";
export default function GridPreview() {
return (
{Array.from({ length: 6 }).map((_, index) => (
{index + 1}
))}
);
}
```
## Props \[#props]
### `Grid` \[#grid]
- `asChild`
- type: `boolean | undefined`
- `color`
- type: `(string & {}) | ScopedColorFg | ScopedColorPalette | undefined`
- `margin`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Margin on all four sides. Cannot be combined with any \`bleed\*\` prop.
- `m`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`margin\`. Cannot be combined with any \`bleed\*\` prop.
- `marginX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Horizontal margin (left + right). Cannot be combined with any \`bleed\*\` prop.
- `mx`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginX\`. Cannot be combined with any \`bleed\*\` prop.
- `marginY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Vertical margin (top + bottom). Cannot be combined with any \`bleed\*\` prop.
- `my`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginY\`. Cannot be combined with any \`bleed\*\` prop.
- `marginTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Top margin. Cannot be combined with any \`bleed\*\` prop.
- `mt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginTop\`. Cannot be combined with any \`bleed\*\` prop.
- `marginRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Right margin. Cannot be combined with any \`bleed\*\` prop.
- `mr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginRight\`. Cannot be combined with any \`bleed\*\` prop.
- `marginBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Bottom margin. Cannot be combined with any \`bleed\*\` prop.
- `mb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginBottom\`. Cannot be combined with any \`bleed\*\` prop.
- `marginLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Left margin. Cannot be combined with any \`bleed\*\` prop.
- `ml`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginLeft\`. Cannot be combined with any \`bleed\*\` prop.
- `bleed`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative margin on all four sides to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedX`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative x-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedY`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative y-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedTop`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative top margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedRight`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative right margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedBottom`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative bottom margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedLeft`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative left margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `flexGrow`
- type: `true | 0 | 1 | (number & {}) | undefined`
- description: If true, flex-grow will be set to \`1\`.
- `position`
- type: `"fixed" | "relative" | "absolute" | "sticky" | undefined`
- `overflowX`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- `overflowY`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- `paddingX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `height`
- type: `ResponsiveValue | undefined`
- `maxHeight`
- type: `ResponsiveValue | undefined`
- `minHeight`
- type: `ResponsiveValue | undefined`
- `justifyContent`
- type: `"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | undefined`
- `alignItems`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `bg`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- description: Shorthand for \`background\`.
- `background`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- `bgGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- description: Shorthand for \`backgroundGradient\`.
- `backgroundGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- `bgGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: Shorthand for \`backgroundGradientDirection\`. e.g. \`43deg\`
- `backgroundGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: e.g. \`43deg\`
- `borderColor`
- type: `(string & {}) | ScopedColorPalette | ScopedColorStroke | undefined`
- `borderWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderTopWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRightWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderBottomWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderLeftWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderTopLeftRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderTopRightRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderBottomRightRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderBottomLeftRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `boxShadow`
- type: `(string & {}) | "s1" | "s2" | "s3" | undefined`
- `width`
- type: `ResponsiveValue | undefined`
- `minWidth`
- type: `ResponsiveValue | undefined`
- `maxWidth`
- type: `ResponsiveValue | undefined`
- `top`
- type: `0 | (string & {}) | undefined`
- `left`
- type: `0 | (string & {}) | undefined`
- `right`
- type: `0 | (string & {}) | undefined`
- `bottom`
- type: `0 | (string & {}) | undefined`
- `padding`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `p`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`padding\`.
- `px`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingX\`.
- `paddingY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `py`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingY\`.
- `paddingTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- `pt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- description: Shorthand for \`paddingTop\`.
- `paddingRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `pr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingRight\`.
- `paddingBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- `pb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- description: Shorthand for \`paddingBottom\`.
- `paddingLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `pl`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingLeft\`.
- `zIndex`
- type: `number | (string & {}) | undefined`
- `flexShrink`
- type: `true | 0 | (number & {}) | undefined`
- description: If true, flex-shrink will be set to \`1\`.
- `flexDirection`
- type: `ResponsiveValue<"row" | "column" | "row-reverse" | "column-reverse"> | undefined`
- `flexWrap`
- type: `true | "wrap" | "wrap-reverse" | "nowrap" | undefined`
- description: If true, flex-wrap will be set to \`wrap\`.
- `justifySelf`
- type: `"center" | "stretch" | "start" | "end" | undefined`
- description: In flexbox layout, this property is ignored.
- `alignContent`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `alignSelf`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `gap`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `gridColumn`
- type: `string | undefined`
- `gridRow`
- type: `string | undefined`
- `unstable_transform`
- type: `string | undefined`
- `_active`
- type: `{ bg?: ScopedColorBg | ScopedColorPalette | (string & {}); background?: ScopedColorBg | ScopedColorPalette | (string & {}); } | undefined`
- `as`
- type: `React.ElementType | undefined`
- `hideFrom`
- type: `BreakpointThreshold | undefined`
- `display`
- type: `ResponsiveValue<"grid" | "none"> | undefined`
- default: `"grid"`
- `align`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- description: Shorthand for \`alignItems\`.
- `justify`
- type: `"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | undefined`
- description: Shorthand for \`justifyContent\`.
- `justifyItems`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `columns`
- type: `ResponsiveValue | undefined`
- description: Shorthand for \`gridTemplateColumns\`. If number, \`repeat(\{columns}, minmax(0, 1fr))\` is applied.
- `rows`
- type: `ResponsiveValue | undefined`
- description: Shorthand for \`gridTemplateRows\`. If number, \`repeat(\{rows}, minmax(0, 1fr))\` is applied.
- `autoFlow`
- type: `"row" | "column" | "row dense" | "column dense" | undefined`
- description: Shorthand for \`gridAutoFlow\`.
- `autoColumns`
- type: `string | undefined`
- description: Shorthand for \`gridAutoColumns\`.
- `autoRows`
- type: `string | undefined`
- description: Shorthand for \`gridAutoRows\`.
### `GridItem` \[#griditem]
`GridItem`은 Grid 컨테이너 내에서 아이템의 배치를 제어하는 컴포넌트입니다. Grid 내부의 모든 아이템이 `GridItem`일 필요는 없습니다.
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: If true, the component will render its children directly without a wrapper element.
- `color`
- type: `(string & {}) | ScopedColorFg | ScopedColorPalette | undefined`
- `margin`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Margin on all four sides. Cannot be combined with any \`bleed\*\` prop.
- `m`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`margin\`. Cannot be combined with any \`bleed\*\` prop.
- `marginX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Horizontal margin (left + right). Cannot be combined with any \`bleed\*\` prop.
- `mx`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginX\`. Cannot be combined with any \`bleed\*\` prop.
- `marginY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Vertical margin (top + bottom). Cannot be combined with any \`bleed\*\` prop.
- `my`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginY\`. Cannot be combined with any \`bleed\*\` prop.
- `marginTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Top margin. Cannot be combined with any \`bleed\*\` prop.
- `mt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginTop\`. Cannot be combined with any \`bleed\*\` prop.
- `marginRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Right margin. Cannot be combined with any \`bleed\*\` prop.
- `mr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginRight\`. Cannot be combined with any \`bleed\*\` prop.
- `marginBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Bottom margin. Cannot be combined with any \`bleed\*\` prop.
- `mb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginBottom\`. Cannot be combined with any \`bleed\*\` prop.
- `marginLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Left margin. Cannot be combined with any \`bleed\*\` prop.
- `ml`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginLeft\`. Cannot be combined with any \`bleed\*\` prop.
- `bleed`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative margin on all four sides to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedX`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative x-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedY`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative y-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedTop`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative top margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedRight`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative right margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedBottom`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative bottom margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedLeft`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative left margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `flexGrow`
- type: `true | 0 | 1 | (number & {}) | undefined`
- description: If true, flex-grow will be set to \`1\`.
- `position`
- type: `"fixed" | "relative" | "absolute" | "sticky" | undefined`
- `overflowX`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- `overflowY`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- `paddingX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `height`
- type: `ResponsiveValue | undefined`
- `maxHeight`
- type: `ResponsiveValue | undefined`
- `minHeight`
- type: `ResponsiveValue | undefined`
- `justifyContent`
- type: `"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | undefined`
- `alignItems`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `bg`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- description: Shorthand for \`background\`.
- `background`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- `bgGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- description: Shorthand for \`backgroundGradient\`.
- `backgroundGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- `bgGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: Shorthand for \`backgroundGradientDirection\`. e.g. \`43deg\`
- `backgroundGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: e.g. \`43deg\`
- `borderColor`
- type: `(string & {}) | ScopedColorPalette | ScopedColorStroke | undefined`
- `borderWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderTopWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRightWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderBottomWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderLeftWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderTopLeftRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderTopRightRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderBottomRightRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderBottomLeftRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `boxShadow`
- type: `(string & {}) | "s1" | "s2" | "s3" | undefined`
- `width`
- type: `ResponsiveValue | undefined`
- `minWidth`
- type: `ResponsiveValue | undefined`
- `maxWidth`
- type: `ResponsiveValue | undefined`
- `top`
- type: `0 | (string & {}) | undefined`
- `left`
- type: `0 | (string & {}) | undefined`
- `right`
- type: `0 | (string & {}) | undefined`
- `bottom`
- type: `0 | (string & {}) | undefined`
- `padding`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `p`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`padding\`.
- `px`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingX\`.
- `paddingY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `py`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingY\`.
- `paddingTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- `pt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- description: Shorthand for \`paddingTop\`.
- `paddingRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `pr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingRight\`.
- `paddingBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- `pb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- description: Shorthand for \`paddingBottom\`.
- `paddingLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `pl`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingLeft\`.
- `display`
- type: `ResponsiveValue<"none" | "grid" | "inline" | "block" | "flex" | "inline-flex" | "inline-block"> | undefined`
- `zIndex`
- type: `number | (string & {}) | undefined`
- `flexShrink`
- type: `true | 0 | (number & {}) | undefined`
- description: If true, flex-shrink will be set to \`1\`.
- `flexDirection`
- type: `ResponsiveValue<"row" | "column" | "row-reverse" | "column-reverse"> | undefined`
- `flexWrap`
- type: `true | "wrap" | "wrap-reverse" | "nowrap" | undefined`
- description: If true, flex-wrap will be set to \`wrap\`.
- `justifySelf`
- type: `"center" | "stretch" | "start" | "end" | undefined`
- description: In flexbox layout, this property is ignored.
- `alignContent`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `alignSelf`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `gap`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `unstable_transform`
- type: `string | undefined`
- `_active`
- type: `{ bg?: ScopedColorBg | ScopedColorPalette | (string & {}); background?: ScopedColorBg | ScopedColorPalette | (string & {}); } | undefined`
- `as`
- type: `React.ElementType | undefined`
- `hideFrom`
- type: `BreakpointThreshold | undefined`
- `colSpan`
- type: `number | "full" | undefined`
- description: Number of columns to span, or "full" for full width (1 / -1).
- `rowSpan`
- type: `number | "full" | undefined`
- description: Number of rows to span, or "full" for full height (1 / -1).
- `colStart`
- type: `number | undefined`
- description: Starting column
- `colEnd`
- type: `number | undefined`
- description: Ending column.
- `rowStart`
- type: `number | undefined`
- description: Starting row
- `rowEnd`
- type: `number | undefined`
- description: Ending row.
## Columns and Rows \[#columns-and-rows]
``의 `columns` 또는 `rows` prop에 number를 지정하여 `grid-template-columns` 또는 `grid-template-rows`를 `repeat(${columns|rows}, minmax(0, 1fr))`로 설정할 수 있습니다.
```tsx
import { Divider, Flex, Grid, HStack } from "@seed-design/react";
export default function GridNumber() {
return (
{[1, 2, 3, 4, 5].map((n) => (
{n}
))}
{[1, 2, 3, 4, 5].map((n) => (
{n}
))}
);
}
```
``의 `columns` 또는 `rows`에 `grid-template-columns` 또는 `grid-template-rows` 값을 직접 지정할 수도 있습니다.
```tsx
import { Divider, Flex, Grid, HStack } from "@seed-design/react";
export default function GridString() {
return (
{[1, 2, 3, 4, 5].map((n) => (
{n}
))}
{[1, 2, 3, 4, 5].map((n) => (
{n}
))}
);
}
```
## Spanning Items \[#spanning-items]
``을 활용하여 그리드 아이템이 여러 열이나 행을 차지하도록 할 수 있습니다.
- `colSpan` 또는 `colStart`, `colEnd` prop으로 열 span을 지정합니다. `colSpan="full"`을 전달하면 행 전체 (좌우 양 끝)을 차지합니다.
- `rowSpan` 또는 `rowStart`, `rowEnd` prop으로 행 span을 지정합니다. `rowSpan="full"`을 전달하면 열 전체 (상하 양 끝)을 차지합니다.
```tsx
import { Divider, Grid, GridItem, HStack } from "@seed-design/react";
export default function Spanning() {
return (
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
);
}
```
## Auto Flow \[#auto-flow]
``의 `autoFlow` prop을 사용하여 아이템이 배치되는 방향을 지정할 수 있습니다.
```tsx
import { useState } from "react";
import { Grid, type GridProps, GridItem, VStack } from "@seed-design/react";
import { SegmentedControl, SegmentedControlItem } from "seed-design/ui/segmented-control";
type AutoFlow = NonNullable;
export default function AutoFlow() {
const [autoFlow, setAutoFlow] = useState("row");
const isColumn = autoFlow.startsWith("column");
const color = isColumn ? "green" : "purple";
const gridProps = isColumn ? { rows: 3 } : { columns: 3 };
const spanProps = isColumn ? { rowSpan: 2 } : { colSpan: 2 };
return (
{[1, 2].map((n) => (
{n}
))}
{[3, 4, 5].map((n) => (
{n}
))}
setAutoFlow(value as AutoFlow)}
aria-label="Auto Flow"
>
rowrow densecolumncolumn dense
);
}
```
## Auto Rows / Columns \[#auto-rows--columns]
``의 `autoRows` 또는 `autoColumns` prop을 사용하여 암시적으로 생성되는 행이나 열의 크기를 지정할 수 있습니다. 동적으로 아이템이 추가되는 그리드에서 유용합니다.
```tsx
import { Divider, Flex, Grid, HStack } from "@seed-design/react";
export default function AutoRowsColumns() {
return (
{[1, 2, 3, 4, 5].map((n) => (
{n === 2
? "Ea anim non aute minim ea deserunt enim Elit deserunt laborum et quis sit."
: n}
))}
{[1, 2, 3, 4, 5].map((n) => (
{n === 2
? "Ea anim non aute minim ea deserunt enim Elit deserunt laborum et quis sit."
: n}
))}
);
}
```
## Using `asChild` Prop \[#using-aschild-prop]
`GridItem`은 `asChild` prop을 사용하여 자식 요소에 직접 grid 속성을 적용할 수 있습니다.
`asChild` prop에 대해 자세히 알아봅니다.
```tsx
Link spanning 2 columns
```
## Using Box for Grid Item Placement \[#using-box-for-grid-item-placement]
`GridItem`은 내부적으로 `colSpan`, `colStart`, `colEnd`, `rowSpan`, `rowStart`, `rowEnd` prop을 `gridColumn` 및 `gridRow` 스타일로 변환하여 `Box`에 적용합니다.
따라서 `Box` 컴포넌트에서 `gridColumn`, `gridRow` prop을 직접 사용할 수도 있습니다.
```tsx
colSpan=2colSpan=fullcolStart=2 colEnd=4
```
## Responsive Design \[#responsive-design]
Grid의 `columns`, `rows`, `gap` 등에 반응형 값을 전달하여 viewport 크기에 따라 레이아웃을 조정할 수 있습니다.
---
file: components/(foundation)/layout/h-stack.mdx
# HStack
가로로 쌓이는 레이아웃을 구성합니다. 디자인 토큰을 JSX에서 사용할 수 있도록 도와줍니다.
## Preview
```tsx
import { Box, HStack } from "@seed-design/react";
export default function HStackPreview() {
return (
1
2
3
);
}
```
## Usage \[#usage]
```tsx
import { HStack } from "@seed-design/react";
```
```tsx
```
## Props \[#props]
- `asChild`
- type: `boolean | undefined`
- `color`
- type: `(string & {}) | ScopedColorFg | ScopedColorPalette | undefined`
- `margin`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Margin on all four sides. Cannot be combined with any \`bleed\*\` prop.
- `m`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`margin\`. Cannot be combined with any \`bleed\*\` prop.
- `marginX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Horizontal margin (left + right). Cannot be combined with any \`bleed\*\` prop.
- `mx`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginX\`. Cannot be combined with any \`bleed\*\` prop.
- `marginY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Vertical margin (top + bottom). Cannot be combined with any \`bleed\*\` prop.
- `my`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginY\`. Cannot be combined with any \`bleed\*\` prop.
- `marginTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Top margin. Cannot be combined with any \`bleed\*\` prop.
- `mt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginTop\`. Cannot be combined with any \`bleed\*\` prop.
- `marginRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Right margin. Cannot be combined with any \`bleed\*\` prop.
- `mr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginRight\`. Cannot be combined with any \`bleed\*\` prop.
- `marginBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Bottom margin. Cannot be combined with any \`bleed\*\` prop.
- `mb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginBottom\`. Cannot be combined with any \`bleed\*\` prop.
- `marginLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Left margin. Cannot be combined with any \`bleed\*\` prop.
- `ml`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginLeft\`. Cannot be combined with any \`bleed\*\` prop.
- `bleed`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative margin on all four sides to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedX`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative x-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedY`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative y-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedTop`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative top margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedRight`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative right margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedBottom`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative bottom margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedLeft`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative left margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `flexGrow`
- type: `true | 0 | 1 | (number & {}) | undefined`
- description: If true, flex-grow will be set to \`1\`.
- `position`
- type: `"fixed" | "relative" | "absolute" | "sticky" | undefined`
- `overflowX`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- `overflowY`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- `direction`
- type: `ResponsiveValue<"row" | "column" | "row-reverse" | "column-reverse"> | undefined`
- description: Shorthand for \`flexDirection\`.
- `paddingX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `height`
- type: `ResponsiveValue | undefined`
- `maxHeight`
- type: `ResponsiveValue | undefined`
- `minHeight`
- type: `ResponsiveValue | undefined`
- `justifyContent`
- type: `"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | undefined`
- `alignItems`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `bg`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- description: Shorthand for \`background\`.
- `background`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- `bgGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- description: Shorthand for \`backgroundGradient\`.
- `backgroundGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- `bgGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: Shorthand for \`backgroundGradientDirection\`. e.g. \`43deg\`
- `backgroundGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: e.g. \`43deg\`
- `borderColor`
- type: `(string & {}) | ScopedColorPalette | ScopedColorStroke | undefined`
- `borderWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderTopWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRightWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderBottomWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderLeftWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderTopLeftRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderTopRightRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderBottomRightRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderBottomLeftRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `boxShadow`
- type: `(string & {}) | "s1" | "s2" | "s3" | undefined`
- `width`
- type: `ResponsiveValue | undefined`
- `minWidth`
- type: `ResponsiveValue | undefined`
- `maxWidth`
- type: `ResponsiveValue | undefined`
- `top`
- type: `0 | (string & {}) | undefined`
- `left`
- type: `0 | (string & {}) | undefined`
- `right`
- type: `0 | (string & {}) | undefined`
- `bottom`
- type: `0 | (string & {}) | undefined`
- `padding`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `p`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`padding\`.
- `px`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingX\`.
- `paddingY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `py`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingY\`.
- `paddingTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- `pt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- description: Shorthand for \`paddingTop\`.
- `paddingRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `pr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingRight\`.
- `paddingBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- `pb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- description: Shorthand for \`paddingBottom\`.
- `paddingLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `pl`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingLeft\`.
- `display`
- type: `ResponsiveValue<"none" | "flex"> | undefined`
- default: `"flex"`
- `zIndex`
- type: `number | (string & {}) | undefined`
- `flexShrink`
- type: `true | 0 | (number & {}) | undefined`
- description: If true, flex-shrink will be set to \`1\`.
- `flexWrap`
- type: `true | "wrap" | "wrap-reverse" | "nowrap" | undefined`
- description: If true, flex-wrap will be set to \`wrap\`.
- `justifySelf`
- type: `"center" | "stretch" | "start" | "end" | undefined`
- description: In flexbox layout, this property is ignored.
- `alignContent`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `alignSelf`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `gap`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `gridColumn`
- type: `string | undefined`
- `gridRow`
- type: `string | undefined`
- `unstable_transform`
- type: `string | undefined`
- `_active`
- type: `{ bg?: ScopedColorBg | ScopedColorPalette | (string & {}); background?: ScopedColorBg | ScopedColorPalette | (string & {}); } | undefined`
- `as`
- type: `React.ElementType | undefined`
- `hideFrom`
- type: `BreakpointThreshold | undefined`
- `wrap`
- type: `true | "wrap" | "wrap-reverse" | "nowrap" | undefined`
- description: Shorthand for \`flexWrap\`.
- `align`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- description: Shorthand for \`alignItems\`.
- `justify`
- type: `"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | undefined`
- description: Shorthand for \`justifyContent\`.
- `grow`
- type: `true | 0 | 1 | (number & {}) | undefined`
- description: Shorthand for \`flexGrow\`.
- `shrink`
- type: `true | 0 | (number & {}) | undefined`
- description: Shorthand for \`flexShrink\`.
## Responsive Design \[#responsive-design]
HStack의 레이아웃 프로퍼티에 반응형 값을 전달하여 viewport 크기에 따라 스타일을 조정할 수 있습니다.
---
file: components/(foundation)/layout/v-stack.mdx
# VStack
세로로 쌓이는 레이아웃을 구성합니다. 디자인 토큰을 JSX에서 사용할 수 있도록 도와줍니다.
## Preview
```tsx
import { Box, VStack } from "@seed-design/react";
export default function VStackPreview() {
return (
1
2
3
);
}
```
## Usage \[#usage]
```tsx
import { VStack } from "@seed-design/react";
```
```tsx
```
## Props \[#props]
- `asChild`
- type: `boolean | undefined`
- `color`
- type: `(string & {}) | ScopedColorFg | ScopedColorPalette | undefined`
- `margin`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Margin on all four sides. Cannot be combined with any \`bleed\*\` prop.
- `m`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`margin\`. Cannot be combined with any \`bleed\*\` prop.
- `marginX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Horizontal margin (left + right). Cannot be combined with any \`bleed\*\` prop.
- `mx`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginX\`. Cannot be combined with any \`bleed\*\` prop.
- `marginY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Vertical margin (top + bottom). Cannot be combined with any \`bleed\*\` prop.
- `my`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginY\`. Cannot be combined with any \`bleed\*\` prop.
- `marginTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Top margin. Cannot be combined with any \`bleed\*\` prop.
- `mt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginTop\`. Cannot be combined with any \`bleed\*\` prop.
- `marginRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Right margin. Cannot be combined with any \`bleed\*\` prop.
- `mr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginRight\`. Cannot be combined with any \`bleed\*\` prop.
- `marginBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Bottom margin. Cannot be combined with any \`bleed\*\` prop.
- `mb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginBottom\`. Cannot be combined with any \`bleed\*\` prop.
- `marginLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Left margin. Cannot be combined with any \`bleed\*\` prop.
- `ml`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginLeft\`. Cannot be combined with any \`bleed\*\` prop.
- `bleed`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative margin on all four sides to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedX`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative x-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedY`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative y-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedTop`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative top margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedRight`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative right margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedBottom`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative bottom margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedLeft`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative left margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `flexGrow`
- type: `true | 0 | 1 | (number & {}) | undefined`
- description: If true, flex-grow will be set to \`1\`.
- `position`
- type: `"fixed" | "relative" | "absolute" | "sticky" | undefined`
- `overflowX`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- `overflowY`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- `direction`
- type: `ResponsiveValue<"row" | "column" | "row-reverse" | "column-reverse"> | undefined`
- description: Shorthand for \`flexDirection\`.
- `paddingX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `height`
- type: `ResponsiveValue | undefined`
- `maxHeight`
- type: `ResponsiveValue | undefined`
- `minHeight`
- type: `ResponsiveValue | undefined`
- `justifyContent`
- type: `"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | undefined`
- `alignItems`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `bg`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- description: Shorthand for \`background\`.
- `background`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- `bgGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- description: Shorthand for \`backgroundGradient\`.
- `backgroundGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- `bgGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: Shorthand for \`backgroundGradientDirection\`. e.g. \`43deg\`
- `backgroundGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: e.g. \`43deg\`
- `borderColor`
- type: `(string & {}) | ScopedColorPalette | ScopedColorStroke | undefined`
- `borderWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderTopWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRightWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderBottomWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderLeftWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderTopLeftRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderTopRightRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderBottomRightRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `borderBottomLeftRadius`
- type: `0 | (string & {}) | "full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | undefined`
- `boxShadow`
- type: `(string & {}) | "s1" | "s2" | "s3" | undefined`
- `width`
- type: `ResponsiveValue | undefined`
- `minWidth`
- type: `ResponsiveValue | undefined`
- `maxWidth`
- type: `ResponsiveValue | undefined`
- `top`
- type: `0 | (string & {}) | undefined`
- `left`
- type: `0 | (string & {}) | undefined`
- `right`
- type: `0 | (string & {}) | undefined`
- `bottom`
- type: `0 | (string & {}) | undefined`
- `padding`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `p`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`padding\`.
- `px`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingX\`.
- `paddingY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `py`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingY\`.
- `paddingTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- `pt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- description: Shorthand for \`paddingTop\`.
- `paddingRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `pr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingRight\`.
- `paddingBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- `pb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "safeArea"> | undefined`
- description: Shorthand for \`paddingBottom\`.
- `paddingLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `pl`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Shorthand for \`paddingLeft\`.
- `display`
- type: `ResponsiveValue<"none" | "flex"> | undefined`
- default: `"flex"`
- `zIndex`
- type: `number | (string & {}) | undefined`
- `flexShrink`
- type: `true | 0 | (number & {}) | undefined`
- description: If true, flex-shrink will be set to \`1\`.
- `flexWrap`
- type: `true | "wrap" | "wrap-reverse" | "nowrap" | undefined`
- description: If true, flex-wrap will be set to \`wrap\`.
- `justifySelf`
- type: `"center" | "stretch" | "start" | "end" | undefined`
- description: In flexbox layout, this property is ignored.
- `alignContent`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `alignSelf`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `gap`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- `gridColumn`
- type: `string | undefined`
- `gridRow`
- type: `string | undefined`
- `unstable_transform`
- type: `string | undefined`
- `_active`
- type: `{ bg?: ScopedColorBg | ScopedColorPalette | (string & {}); background?: ScopedColorBg | ScopedColorPalette | (string & {}); } | undefined`
- `as`
- type: `React.ElementType | undefined`
- `hideFrom`
- type: `BreakpointThreshold | undefined`
- `wrap`
- type: `true | "wrap" | "wrap-reverse" | "nowrap" | undefined`
- description: Shorthand for \`flexWrap\`.
- `align`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- description: Shorthand for \`alignItems\`.
- `justify`
- type: `"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | undefined`
- description: Shorthand for \`justifyContent\`.
- `grow`
- type: `true | 0 | 1 | (number & {}) | undefined`
- description: Shorthand for \`flexGrow\`.
- `shrink`
- type: `true | 0 | (number & {}) | undefined`
- description: Shorthand for \`flexShrink\`.
## Responsive Design \[#responsive-design]
VStack의 레이아웃 프로퍼티에 반응형 값을 전달하여 viewport 크기에 따라 스타일을 조정할 수 있습니다.
---
file: components/(foundation)/typography/text.mdx
# Text
텍스트를 표시하는 기본 타이포그래피 컴포넌트입니다. 일관된 글꼴 스타일과 크기를 적용하여 텍스트를 렌더링할 때 사용됩니다.
## Preview
```tsx
import { Flex, Text } from "@seed-design/react";
export default function TextPreview() {
return (
t1Regular
t2Regular
t3Regular
t4Regular
t5Regular
t6Bold
t7Bold
t8Bold
t9Bold
t10Bold
t11Bold
t12Bold
t13Bold
t14Bold
);
}
```
## Usage \[#usage]
```tsx
import { Text } from "@seed-design/react";
```
```tsx
```
## Props \[#props]
- `as`
- type: `"p" | "dd" | "dt" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "legend" | "span" | "strong" | undefined`
- default: `"span"`
- description: The element to render as
- `color`
- type: `(string & {}) | ScopedColorFg | ScopedColorPalette | undefined`
- description: The color of the text.
- `fontSize`
- type: `(string & {}) | "t2" | "t3" | "t4" | "t6" | "t5" | "t1" | "t7" | "t8" | "t9" | "t10" | "t11" | "t12" | "t13" | "t14" | "t1Static" | "t2Static" | "t3Static" | "t4Static" | "t5Static" | "t6Static" | "t7Static" | "t8Static" | "t9Static" | "t10Static" | "t11Static" | "t12Static" | "t13Static" | "t14Static" | undefined`
- description: The font size of the text. Partially overrides the textStyle.
- `lineHeight`
- type: `(string & {}) | "t2" | "t3" | "t4" | "t6" | "t5" | "t1" | "t7" | "t8" | "t9" | "t10" | "t11" | "t12" | "t13" | "t14" | "t1Static" | "t2Static" | "t3Static" | "t4Static" | "t5Static" | "t6Static" | "t7Static" | "t8Static" | "t9Static" | "t10Static" | "t11Static" | "t12Static" | "t13Static" | "t14Static" | undefined`
- description: The line height of the text. Partially overrides the textStyle.
- `fontWeight`
- type: `"bold" | "medium" | "regular" | undefined`
- description: The font weight of the text. Partially overrides the textStyle.
- `maxLines`
- type: `number | undefined`
- description: The maximum number of lines to display. If the text overflows, it will be truncated.
- `align`
- type: `"left" | "right" | "center" | undefined`
- description: The alignment of the text.
- `userSelect`
- type: `"auto" | "none" | "text" | undefined`
- description: The user-select behavior of the text.
- `whiteSpace`
- type: `"nowrap" | "pre" | "break-spaces" | "normal" | "pre-line" | "pre-wrap" | undefined`
- description: The white-space behavior of the text.
- `textStyle`
- type: `"screenTitle" | "articleBody" | "articleNote" | "t1Regular" | "t1Medium" | "t1Bold" | "t2Regular" | "t2Medium" | "t2Bold" | "t3Regular" | "t3Medium" | "t3Bold" | "t4Regular" | "t4Medium" | "t4Bold" | "t5Regular" | "t5Medium" | "t5Bold" | "t6Regular" | "t6Medium" | "t6Bold" | "t7Regular" | "t7Medium" | "t7Bold" | "t8Regular" | "t8Medium" | "t8Bold" | "t9Regular" | "t9Medium" | "t9Bold" | "t10Regular" | "t10Medium" | "t10Bold" | "t11Regular" | "t11Medium" | "t11Bold" | "t12Regular" | "t12Medium" | "t12Bold" | "t13Regular" | "t13Medium" | "t13Bold" | "t14Regular" | "t14Medium" | "t14Bold" | "t1StaticRegular" | "t1StaticMedium" | "t1StaticBold" | "t2StaticRegular" | "t2StaticMedium" | "t2StaticBold" | "t3StaticRegular" | "t3StaticMedium" | "t3StaticBold" | "t4StaticRegular" | "t4StaticMedium" | "t4StaticBold" | "t5StaticRegular" | "t5StaticMedium" | "t5StaticBold" | "t6StaticRegular" | "t6StaticMedium" | "t6StaticBold" | "t7StaticRegular" | "t7StaticMedium" | "t7StaticBold" | "t8StaticRegular" | "t8StaticMedium" | "t8StaticBold" | "t9StaticRegular" | "t9StaticMedium" | "t9StaticBold" | "t10StaticRegular" | "t10StaticMedium" | "t10StaticBold" | "t11StaticRegular" | "t11StaticMedium" | "t11StaticBold" | "t12StaticRegular" | "t12StaticMedium" | "t12StaticBold" | "t13StaticRegular" | "t13StaticMedium" | "t13StaticBold" | "t14StaticRegular" | "t14StaticMedium" | "t14StaticBold" | undefined`
- default: `"t5Regular"`
- description: - \`screenTitle\`: 화면에 크게 표시되는 주요 제목이나 타이틀에 사용합니다. - \`articleBody\`: 게시물이나 콘텐츠 중심 섹션의 본문 텍스트에 사용합니다. - \`articleNote\`: 주석, 참고 사항 및 상세 리스트 등 부가 정보에 사용하며, 일반 본문 텍스트에는 사용하지 않습니다. - \`t11Regular\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. - \`t11Medium\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. - \`t11Bold\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. - \`t12Regular\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. - \`t12Medium\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. - \`t12Bold\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. - \`t13Regular\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. - \`t13Medium\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. - \`t13Bold\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. - \`t14Regular\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. - \`t14Medium\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. - \`t14Bold\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. - \`t1StaticRegular\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t1StaticMedium\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t1StaticBold\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t2StaticRegular\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t2StaticMedium\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t2StaticBold\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t3StaticRegular\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t3StaticMedium\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t3StaticBold\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t4StaticRegular\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t4StaticMedium\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t4StaticBold\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t5StaticRegular\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t5StaticMedium\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t5StaticBold\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t6StaticRegular\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t6StaticMedium\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t6StaticBold\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t7StaticRegular\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t7StaticMedium\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t7StaticBold\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t8StaticRegular\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t8StaticMedium\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t8StaticBold\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t9StaticRegular\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t9StaticMedium\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t9StaticBold\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t10StaticRegular\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t10StaticMedium\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t10StaticBold\`: 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t11StaticRegular\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t11StaticMedium\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t11StaticBold\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t12StaticRegular\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t12StaticMedium\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t12StaticBold\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t13StaticRegular\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t13StaticMedium\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t13StaticBold\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t14StaticRegular\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t14StaticMedium\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다. - \`t14StaticBold\`: \`sm\` breakpoint 이상에서만 사용하는 것을 권장합니다. 폰트 스케일링에 반응하지 않도록 static text size와 static line height 토큰을 사용합니다.
- `textDecorationLine`
- type: `"none" | "line-through" | "underline" | undefined`
- default: `"none"`
## Examples \[#examples]
### Text Styles \[#text-styles]
Figma의 Text Style과 대응되는 `textStyle` 속성을 사용하는 것이 기본 방법입니다. `textStyle`은 글꼴 크기, 줄 간격, 글꼴 굵기를 한 번에 설정합니다.
```tsx
import { Flex, Text } from "@seed-design/react";
export default function TextTextStyles() {
return (
t1Regular
t2Regular
t3Regular
t4Regular
t5Regular
t6Bold
t7Bold
t8Bold
t9Bold
t10Bold
);
}
```
#### Font Sizes \[#font-sizes]
더 구체적으로 변경이 필요한 경우 `fontSize` 및 `lineHeight` 속성을 각각 사용할 수 있습니다.
`lineHeight` 속성은 `fontSize`에 대응되는 기본값으로 설정되며, `lineHeight` 속성으로 변경이 가능합니다.
```tsx
import { Flex, Text } from "@seed-design/react";
export default function TextFontSizes() {
return (
t1
t2
t3
t4
t5
t6
t7
t8
t9
t10
);
}
```
#### Font Weights \[#font-weights]
더 구체적으로 변경이 필요한 경우 `fontWeight` 속성을 사용할 수 있습니다.
```tsx
import { Flex, Text } from "@seed-design/react";
export default function TextFontWeights() {
return (
regular
medium
bold
);
}
```
### Text Decoration Lines \[#text-decoration-lines]
`textDecorationLine` 속성을 사용하여 텍스트에 밑줄 또는 취소선을 추가할 수 있습니다.
- 링크가 아닌 텍스트를 강조하기 위해 밑줄을 적용할 때는 사용자 경험을 고려해야 합니다. 밑줄이 있는 텍스트는 링크로 인식될 수 있으므로, 혼동을 피하기 위해 적절한 상황에서만 사용해야 합니다.
- 본문 밖 영역에서 인라인 텍스트를 링크 용도로 사용하고자 하는 경우 [ActionButton](/react/components/action-button)을 `variant="ghost" bleedX="asPadding" bleedY="asPadding"` 옵션으로 사용하는 것을 고려해보세요.
```tsx
import { Flex, Text } from "@seed-design/react";
export default function TextTextDecorationLines() {
return (
underline
line-through
);
}
```
### Max Lines \[#max-lines]
`maxLines` 속성을 사용하여 텍스트가 차지하는 최대 줄 수를 제한할 수 있습니다. 지정된 줄 수를 초과하는 텍스트는 생략 부호(ellipsis) `…` 로 표시됩니다.
```tsx
import { Flex, Text } from "@seed-design/react";
export default function TextMaxLines() {
return (
maxLines=1 Aliquip pariatur adipisicing elit consectetur velit commodo Lorem nulla eu.
Occaecat sint voluptate ut dolore eiusmod minim qui reprehenderit. Do aliquip tempor ipsum
aliqua enim. Incididunt irure do ullamco esse sit enim mollit nisi anim laboris do. Ut
fugiat aliquip velit eiusmod ad incididunt. Consequat qui quis in ad culpa officia eu in
Lorem. Elit voluptate est veniam aliqua magna Lorem proident incididunt amet aliquip.
Aliquip sint sit ex eiusmod sint. Eiusmod incididunt consequat fugiat.
maxLines=2 Aliquip pariatur adipisicing elit consectetur velit commodo Lorem nulla eu.
Occaecat sint voluptate ut dolore eiusmod minim qui reprehenderit. Do aliquip tempor ipsum
aliqua enim. Incididunt irure do ullamco esse sit enim mollit nisi anim laboris do. Ut
fugiat aliquip velit eiusmod ad incididunt. Consequat qui quis in ad culpa officia eu in
Lorem. Elit voluptate est veniam aliqua magna Lorem proident incididunt amet aliquip.
Aliquip sint sit ex eiusmod sint. Eiusmod incididunt consequat fugiat.
maxLines=3 Aliquip pariatur adipisicing elit consectetur velit commodo Lorem nulla eu.
Occaecat sint voluptate ut dolore eiusmod minim qui reprehenderit. Do aliquip tempor ipsum
aliqua enim. Incididunt irure do ullamco esse sit enim mollit nisi anim laboris do. Ut
fugiat aliquip velit eiusmod ad incididunt. Consequat qui quis in ad culpa officia eu in
Lorem. Elit voluptate est veniam aliqua magna Lorem proident incididunt amet aliquip.
Aliquip sint sit ex eiusmod sint. Eiusmod incididunt consequat fugiat.
);
}
```
### User Select \[#user-select]
`userSelect` 속성을 사용하여 사용자가 텍스트를 선택할 수 있는지 여부를 제어할 수 있습니다.
```tsx
import { Flex, Text } from "@seed-design/react";
export default function TextUserSelect() {
return (
auto
none
text
);
}
```
### Static \[#static]
폰트 스케일링에 반응하지 않는 static 토큰을 활용하는 텍스트 스타일을 적용할 수 있습니다.
```tsx
import { Flex, Text } from "@seed-design/react";
export default function TextStatic() {
return (
t1StaticRegular
t2StaticRegular
t3StaticRegular
t4StaticRegular
t5StaticRegular
t6StaticBold
t7StaticBold
t8StaticBold
t9StaticBold
t10StaticBold
);
}
```
### White Space \[#white-space]
`whiteSpace` prop은 `maxLines` prop을 사용하지 않을 때만 적용됩니다.
```tsx
import { Box, Text, VStack } from "@seed-design/react";
const sampleText = `이것은 여러 개 의
공백, 줄바꿈과
들여쓰기를 포함한 샘플 텍스트입니다. 각각의 white-space 속성\n값이 어떻게 작동하는지 보여줍니다.`;
export default function TextWhiteSpace() {
return (
{(["normal", "nowrap", "pre", "pre-wrap", "pre-line", "break-spaces"] as const).map(
(value) => (
{value}{sampleText}
),
)}
);
}
```
---
file: components/accordion.mdx
# Accordion
여러 개의 관련된 콘텐츠 섹션을 수직으로 나열하고, 각 섹션을 펼치거나 접어 정보를 탐색할 수 있는 컴포넌트입니다.
## Preview
```tsx
import { Box } from "@seed-design/react";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "seed-design/ui/accordion";
export default function AccordionPreview() {
return (
첫 번째 항목의 내용입니다.
두 번째 항목의 내용입니다.
세 번째 항목의 내용입니다.
);
}
```
## Installation \[#installation]
- npm: npx @seed-design/cli@latest add ui:accordion
- pnpm: pnpm dlx @seed-design/cli@latest add ui:accordion
- yarn: yarn dlx @seed-design/cli@latest add ui:accordion
- bun: bun x @seed-design/cli@latest add ui:accordion
## Props \[#props]
### `Accordion` \[#accordion]
- `variant`
- type: `"inline" | "separated" | undefined`
- default: `"inline"`
- description: - \`inline\`: Accordion Item들이 하나의 연속된 목록처럼 표현됩니다. 밀접하게 관련된 항목들을 컴팩트하게 나열할 때 사용합니다. - \`separated\`: 각 Accordion Item이 개별 카드 형태로 분리되어 표현됩니다. 항목 간 시각적 독립성이 필요하거나, 각 섹션의 중요도가 동등할 때 사용합니다.
- `size`
- type: `"medium" | "large" | "responsive" | undefined`
- default: `"medium"`
- description: - \`responsive\`: 뷰포트 너비에 따라 적용되는 사이즈가 달라집니다. Breakpoint \`md\` 미만에서는 \`medium\`, \`md\` 이상에서는 \`large\`로 적용됩니다.
- `values`
- type: `string[] | undefined`
- `defaultValues`
- type: `string[] | undefined`
- `onValuesChange`
- type: `((values: string[]) => void) | undefined`
- `disabled`
- type: `boolean | undefined`
- `multiple`
- type: `boolean | undefined`
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### `AccordionItem` \[#accordionitem]
- `value`
- type: `string`
- required: `true`
- `disabled`
- type: `boolean | undefined`
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### `AccordionTrigger` \[#accordiontrigger]
- `title`
- type: `React.ReactNode`
- required: `true`
- `description`
- type: `React.ReactNode`
- `prefix`
- type: `React.ReactNode`
- `suffixIcon`
- type: `React.ReactNode`
- `headingLevel`
- type: `5 | 1 | 2 | 3 | 4 | 6 | undefined`
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### `AccordionContent` \[#accordioncontent]
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
## Examples \[#examples]
### Inline Variant \[#inline-variant]
기본 variant입니다. 아이템이 연속된 흐름으로 제공되며, 아이템 사이에 구분선이 표시됩니다.
```tsx
import { Box } from "@seed-design/react";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "seed-design/ui/accordion";
export default function AccordionInline() {
return (
첫 번째 항목의 내용입니다.
두 번째 항목의 내용입니다.
세 번째 항목의 내용입니다.
);
}
```
### Separated \[#separated]
`variant="separated"` 를 사용하면 각 항목이 분리된 카드 형태로 표시됩니다.
```tsx
import { Box } from "@seed-design/react";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "seed-design/ui/accordion";
export default function AccordionSeparated() {
return (
첫 번째 항목의 내용입니다.
두 번째 항목의 내용입니다.
세 번째 항목의 내용입니다.
);
}
```
### Multiple \[#multiple]
기본적으로 한 번에 하나의 항목만 펼칠 수 있습니다. `multiple` prop을 사용하면 여러 항목을 동시에 펼칠 수 있습니다.
```tsx
import { Box } from "@seed-design/react";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "seed-design/ui/accordion";
export default function AccordionMultiple() {
return (
여러 항목을 동시에 펼칠 수 있습니다.
각 항목은 다른 항목과 독립적으로 열고 닫힙니다.
세 번째 항목의 내용입니다.
);
}
```
### Always one open \[#always-one-open]
`values`와 `onValuesChange`를 사용해 controlled 패턴으로 운영하면, 빈 배열이 들어올 때 setter를 호출하지 않는 가드만 추가하여 항상 하나의 항목이 열려 있도록 강제할 수 있습니다.
```tsx
import { Box } from "@seed-design/react";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "seed-design/ui/accordion";
import { useState } from "react";
export default function AccordionControlledRequiredOpen() {
const [values, setValues] = useState(["item-1"]);
return (
{
if (next.length === 0) return;
setValues(next);
}}
>
현재 항목은 다시 눌러도 닫히지 않고, 다른 항목을 선택할 때만 전환됩니다.
평일 오후 2시 이전 주문은 당일 출고되며, 주말 주문은 다음 영업일에 출고됩니다.
수령 후 7일 이내에 교환 또는 반품을 요청할 수 있습니다.
);
}
```
### Size \[#size]
`size`로 Accordion의 크기를 정합니다. (default: `medium`)
`responsive`는 화면 너비에 따라 size가 자동으로 전환되는 값입니다. 여러 화면 너비를 함께 지원하는 제품에서 `size=responsive`를 사용하여 대응합니다.
```tsx
import { Box, VStack } from "@seed-design/react";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "seed-design/ui/accordion";
export default function AccordionSize() {
return (
항목의 내용입니다.항목의 내용입니다.항목의 내용입니다.
);
}
```
### Prefix \[#prefix]
`prefix` prop에 아이콘 같은 앞쪽 요소를 전달할 수 있습니다.
```tsx
import { Box, Icon } from "@seed-design/react";
import {
IconCardLine,
IconQuestionmarkCircleLine,
IconTruckLine,
} from "@karrotmarket/react-monochrome-icon";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "seed-design/ui/accordion";
export default function AccordionWithPrefixIcon() {
return (
} />} title="배송 방법" />
일반 배송, 빠른 배송, 방문 수령 중 주문 상황에 맞는 방법을 선택할 수 있습니다.
} />} title="결제 및 쿠폰" />
카드, 간편결제, 보유 쿠폰을 한 번에 확인하고 결제에 적용할 수 있습니다.
} />}
title="문의와 환불"
/>
주문 취소 가능 시간, 환불 소요 기간, 고객센터 문의 방법을 확인할 수 있습니다.
);
}
```
### Description \[#description]
`description` prop으로 트리거에 부가 설명을 추가할 수 있습니다.
```tsx
import { Box } from "@seed-design/react";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "seed-design/ui/accordion";
export default function AccordionWithDescription() {
return (
첫 번째 항목의 내용입니다.
두 번째 항목의 내용입니다.
세 번째 항목의 내용입니다.
);
}
```
### Disabled \[#disabled]
`disabled` prop으로 전체 또는 개별 항목을 비활성화할 수 있습니다.
- `Accordion`에 `disabled`를 설정하면 모든 항목이 비활성화됩니다.
- `AccordionItem`에 `disabled`를 설정하면 해당 항목만 비활성화됩니다.
```tsx
import { Box } from "@seed-design/react";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "seed-design/ui/accordion";
export default function AccordionDisabled() {
return (
이 항목은 활성화 상태입니다.
이 항목은 비활성화 상태입니다.
이 항목은 활성화 상태입니다.
);
}
```
### Controlled \[#controlled]
`values`와 `onValuesChange`를 사용하여 열림 상태를 직접 제어할 수 있습니다.
```tsx
import { Box } from "@seed-design/react";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "seed-design/ui/accordion";
import { useState } from "react";
export default function AccordionControlled() {
const [values, setValues] = useState(["item-1"]);
return (
첫 번째 항목의 내용입니다.
두 번째 항목의 내용입니다.
세 번째 항목의 내용입니다.
);
}
```
### Value Array Changes \[#value-array-changes]
controlled 모드에서는 현재 열려 있는 항목이 `values` 배열로 전달됩니다. 아래 예시는 트리거를 누를 때마다 최신 `values`와 최근 `onValuesChange` 결과를 함께 보여줍니다.
```tsx
import { Box, Text, VStack } from "@seed-design/react";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "seed-design/ui/accordion";
import { useState } from "react";
const DEFAULT_VALUES = ["shipping"];
export default function AccordionValueChanges() {
const [values, setValues] = useState(DEFAULT_VALUES);
const [history, setHistory] = useState([DEFAULT_VALUES]);
return (
{
setValues(nextValues);
setHistory((prev) => [nextValues, ...prev].slice(0, 5));
}}
>
빠른 배송, 새벽 배송, 방문 수령 옵션을 비교할 수 있습니다.
카드, 계좌이체, 간편결제 중에서 원하는 결제 수단을 선택할 수 있습니다.
주문 취소 가능 시간과 환불 소요 기간을 확인할 수 있습니다.
values: {JSON.stringify(values)}
onValuesChange history:
{history.map((snapshot, index) => (
{index + 1}. {JSON.stringify(snapshot)}
))}
);
}
```
### Default Expanded \[#default-expanded]
`defaultValues`를 사용하여 초기 열림 상태를 지정할 수 있습니다.
```tsx
import { Box } from "@seed-design/react";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "seed-design/ui/accordion";
export default function AccordionDefaultExpanded() {
return (
첫 번째 항목은 기본으로 펼쳐진 상태입니다.
두 번째 항목의 내용입니다.
세 번째 항목의 내용입니다.
);
}
```
### Custom Content \[#custom-content]
`AccordionContent`는 열림/닫힘 애니메이션 컨테이너 역할만 합니다. 기본 패딩, 배경색, 테두리, 타이포그래피 스타일은 제공하지 않으므로 내부 콘텐츠에서 직접 구성해야 합니다. 아래 예시처럼 `Box`로 패딩과 배경을 명시적으로 주는 패턴을 권장합니다.
```tsx
import { Box, Text, VStack } from "@seed-design/react";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "seed-design/ui/accordion";
export default function AccordionCustomContent() {
return (
일반 배송주문 후 영업일 기준 2-3일 내에 배송됩니다.
제주 및 도서산간 지역은 1-2일이 추가 소요될 수 있습니다.
1. 고객센터로 반품/교환 요청2. 상품 수거 (택배 방문 수거)3. 검수 후 환불 또는 교환 처리
);
}
```
## Accessibility \[#accessibility]
[WAI-ARIA Accordion Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/)을 따릅니다.
`AccordionTrigger`는 내부적으로 `heading > button` 구조를 구성합니다. 기본 heading level은 `h3`이며, 문서 구조에 맞춰 다른 level이 필요하면 `headingLevel` prop으로 조정할 수 있습니다. WAI-ARIA APG 예시에서도 상위 섹션 구조에 맞춰 `h3`를 사용합니다.
- Pattern: [WAI-ARIA APG Accordion Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/)
- Example: [WAI-ARIA APG Accordion Example](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/examples/accordion/)
### Heading Level Escape Hatch \[#heading-level-escape-hatch]
상위 섹션 heading이 이미 존재한다면 `headingLevel`로 accordion header의 level을 맞춰 주세요. 예를 들어 accordion이 `h3` 섹션 안에 들어간다면 각 항목 header는 `h4`로 내리는 식으로 문서 outline을 유지할 수 있습니다.
```tsx
import { Box, Text, VStack } from "@seed-design/react";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "seed-design/ui/accordion";
export default function AccordionHeadingLevel() {
return (
주문 도움말
배송 관련 세부 내용은 h4 heading 아래의 accordion section으로 제공할 수 있습니다.
);
}
```
### 키보드 인터랙션 \[#키보드-인터랙션]
| 키 | 동작 |
| ----------------- | --------------------------------------- |
| `Enter` / `Space` | 포커스된 트리거의 패널을 펼치거나 접습니다. |
| `Tab` | 다음 포커스 가능한 요소로 이동합니다. |
| `Shift + Tab` | 이전 포커스 가능한 요소로 이동합니다. |
| `ArrowDown` | 다음 트리거로 포커스를 이동합니다. 마지막이면 첫 번째로 순환합니다. |
| `ArrowUp` | 이전 트리거로 포커스를 이동합니다. 첫 번째이면 마지막으로 순환합니다. |
| `Home` | 첫 번째 트리거로 포커스를 이동합니다. |
| `End` | 마지막 트리거로 포커스를 이동합니다. |
---
file: components/action-button.mdx
# Action Button
명확한 액션을 쉽게 수행할 수 있도록 돕는 기본 인터랙션 컴포넌트입니다.
## Preview
```tsx
import { ActionButton } from "seed-design/ui/action-button";
export default function ActionButtonPreview() {
return 라벨;
}
```
## Installation \[#installation]
- npm: npx @seed-design/cli@latest add ui:action-button
- pnpm: pnpm dlx @seed-design/cli@latest add ui:action-button
- yarn: yarn dlx @seed-design/cli@latest add ui:action-button
- bun: bun x @seed-design/cli@latest add ui:action-button
## Props \[#props]
- `color`
- type: `ScopedColorFg | ScopedColorPalette | undefined`
- default: `"fg.neutral"`
- description: Color of the label and icons inside the button. Works only when \`variant\` is \`ghost\`.
- `fontWeight`
- type: `"bold" | "medium" | "regular" | undefined`
- default: `"bold"`
- description: Weight of the label. Works only when \`variant\` is \`ghost\`.
- `variant`
- type: `"brandSolid" | "criticalSolid" | "neutralSolid" | "neutralWeak" | "ghost" | "neutralOutline" | "brandOutline" | undefined`
- default: `"brandSolid"`
- description: - \`brandSolid\`: 브랜드의 핵심 가치를 전달하며, 사용자 간 연결이 일어나는 서비스의 주요 기능에 사용합니다. 한 화면에 하나만 사용하는 것을 권장합니다. - \`neutralSolid\`: 대부분의 화면에서 CTA로 사용합니다. 한 화면에 하나만 사용하는 것을 권장합니다. - \`neutralWeak\`: CTA를 제외한 대부분의 액션에 사용됩니다. - \`criticalSolid\`: 삭제나 초기화처럼 되돌릴 수 없는 중요한 작업에 사용합니다. - \`brandOutline\`: variant=brandSolid, neutralSolid, criticalSolid와 함께 사용할 수 없으며, variant=neutralOutline과 조합하여 사용하는 것을 권장합니다. - \`neutralOutline\`: variant=brandSolid, neutralSolid, criticalSolid와 함께 사용할 수 없으며, variant=brandOutline과 조합하여 사용하는 것을 권장합니다. - \`ghost\`: 배경 없이 텍스트와 아이콘만 표시됩니다. 모두 동일한 색상을 사용하는 조건에서 icon, prefix icon, suffix icon, label에 정의된 color를 변경할 수 있으며, label의 fontWeight를 \`$font-weight.regular\` 또는 \`$font-weight.medium\`으로 변경하여 주목도를 조절할 수 있습니다.
- `size`
- type: `"small" | "medium" | "large" | "xsmall" | undefined`
- default: `"medium"`
- description: - \`xsmall\`: 작은 공간에서 효율적으로 사용할 수 있는 Pill 형태로 제공됩니다. - \`small\`: 화면 중앙에서 범용적으로 사용됩니다. - \`medium\`: 화면 중앙에서 범용적으로 사용됩니다. - \`large\`: 주로 CTA 역할로 사용됩니다.
- `layout`
- type: `"withText" | "iconOnly" | undefined`
- default: `"withText"`
- description: - \`withText\`: 텍스트와 함께 아이콘을 표시할 수 있습니다. - \`iconOnly\`: 아이콘만으로 의미를 전달하기 때문에 접근성이 떨어집니다. 꼭 필요한 경우에만 접근성 레이블과 함께 사용하는 것을 권장합니다.
- `loading`
- type: `boolean | undefined`
- default: `false`
- description: 버튼에 등록된 비동기 작업이 진행 중임을 사용자에게 알립니다.
- `disabled`
- type: `boolean | undefined`
- default: `false`
- description: 버튼의 비활성화 여부를 나타냅니다.
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
- `bleed`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative margin on all four sides to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedX`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative x-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedY`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative y-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `flexGrow`
- type: `true | 0 | 1 | (number & {}) | undefined`
- description: If true, flex-grow will be set to \`1\`.
## Examples \[#examples]
### Brand Solid \[#brand-solid]
```tsx
import { ActionButton } from "seed-design/ui/action-button";
export default function ActionButtonBrandSolid() {
return 라벨;
}
```
### Neutral Solid \[#neutral-solid]
```tsx
import { ActionButton } from "seed-design/ui/action-button";
export default function ActionButtonNeutralSolid() {
return 라벨;
}
```
### Neutral Weak \[#neutral-weak]
```tsx
import { ActionButton } from "seed-design/ui/action-button";
export default function ActionButtonNeutralWeak() {
return 라벨;
}
```
### Critical Solid \[#critical-solid]
```tsx
import { ActionButton } from "seed-design/ui/action-button";
export default function ActionButtonCriticalSolid() {
return 라벨;
}
```
### Brand Outline \[#brand-outline]
```tsx
import { ActionButton } from "seed-design/ui/action-button";
export default function ActionButtonBrandOutline() {
return 라벨;
}
```
### Neutral Outline \[#neutral-outline]
```tsx
import { ActionButton } from "seed-design/ui/action-button";
export default function ActionButtonNeutralOutline() {
return 라벨;
}
```
### Ghost \[#ghost]
Ghost variant는 `color` 속성을 사용해 레이블과 아이콘의 색상을, `fontWeight` 속성을 사용해 글꼴의 굵기를 변경할 수 있습니다.
```tsx
import { HStack, PrefixIcon, VStack } from "@seed-design/react";
import { ActionButton } from "seed-design/ui/action-button";
import { IconTagFill } from "@karrotmarket/react-monochrome-icon";
export default function ActionButtonGhost() {
return (
} />
Default (fg.neutral)
} />
Neutral Subtle
} />
Brand
Default (Bold)
Medium
Regular
);
}
```
### Icon Only \[#icon-only]
```tsx
import { IconPlusFill } from "@karrotmarket/react-monochrome-icon";
import { Icon } from "@seed-design/react";
import { ActionButton } from "seed-design/ui/action-button";
export default function ActionButtonIconOnly() {
return (
} />
);
}
```
### Prefix Icon \[#prefix-icon]
```tsx
import { IconPlusFill } from "@karrotmarket/react-monochrome-icon";
import { PrefixIcon } from "@seed-design/react";
import { ActionButton } from "seed-design/ui/action-button";
export default function ActionButtonPrefixIcon() {
return (
} />
라벨
);
}
```
### Suffix Icon \[#suffix-icon]
```tsx
import { IconChevronRightFill } from "@karrotmarket/react-monochrome-icon";
import { SuffixIcon } from "@seed-design/react";
import { ActionButton } from "seed-design/ui/action-button";
export default function ActionButtonSuffixIcon() {
return (
라벨
} />
);
}
```
### Disabled \[#disabled]
```tsx
import { ActionButton } from "seed-design/ui/action-button";
export default function ActionButtonDisabled() {
return 라벨;
}
```
### Loading \[#loading]
```tsx
import { useState } from "react";
import { ActionButton } from "seed-design/ui/action-button";
export default function ActionButtonLoading() {
const [loading, setLoading] = useState(false);
function handleClick() {
setLoading(true);
setTimeout(() => setLoading(false), 2000);
}
// 이벤트 핸들링이 필요할 수 있으므로 loading은 disabled를 포함하지 않습니다. 이벤트 발생을 원하지 않는 경우, disabled 속성을 추가해주세요.
return (
시간이 걸리는 액션
);
}
```
### Bleed \[#bleed]
`bleedX`, `bleedY` 속성을 사용해 버튼이 레이아웃에서 "빠져나오게" 할 수 있습니다.
Ghost variant를 시각적으로 정렬해야 할 때 유용합니다.
```tsx
import { HStack, Text, VStack } from "@seed-design/react";
import { ActionButton } from "seed-design/ui/action-button";
export default function ActionButtonBleed() {
return (
Bleed Example
Bleed Y
Bleed Example
Bleed all sides
);
}
```
---
file: components/alert-dialog.mdx
# Alert Dialog
사용자의 확인이 반드시 필요한 경우 강력한 표현 및 경고 수단으로 활용하는 컴포넌트입니다.
## Preview
```tsx
import { ResponsivePair } from "@seed-design/react";
import { ActionButton } from "seed-design/ui/action-button";
import {
AlertDialogAction,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogRoot,
AlertDialogTitle,
AlertDialogTrigger,
} from "seed-design/ui/alert-dialog";
const AlertDialogSingle = () => {
return (
// You can set z-index dialog with "--layer-index" custom property. useful for stackflow integration.
열기주의이 작업은 되돌릴 수 없습니다.취소확인
);
};
export default AlertDialogSingle;
```
Stackflow와 Alert Dialog를 함께 사용하는 방법에 대해 알아보세요.
## Installation \[#installation]
- npm: npx @seed-design/cli@latest add ui:alert-dialog
- pnpm: pnpm dlx @seed-design/cli@latest add ui:alert-dialog
- yarn: yarn dlx @seed-design/cli@latest add ui:alert-dialog
- bun: bun x @seed-design/cli@latest add ui:alert-dialog
## Props \[#props]
### `AlertDialogRoot` \[#alertdialogroot]
- `closeOnInteractOutside`
- type: `boolean | undefined`
- default: `false`
- description: Whether to close the dialog when the outside is clicked
- `lazyMount`
- type: `boolean | undefined`
- default: `true`
- description: Whether to enable lazy mounting
- `unmountOnExit`
- type: `boolean | undefined`
- default: `true`
- description: Whether to unmount on exit.
- `skipAnimation`
- type: `boolean | undefined`
- default: `false`
- `children`
- type: `React.ReactNode`
- required: `true`
- `role`
- type: `"alertdialog" | "dialog" | undefined`
- default: `"dialog"`
- description: The role of the dialog.
- `modal`
- type: `boolean | undefined`
- default: `true`
- description: Whether the dialog should behave as a modal overlay. When true, focus is trapped, background content is hidden from assistive technology, and \`aria-modal\` is set. Set to \`false\` to temporarily suspend modal behavior (e.g., when a Stackflow Activity is pushed on top of a mounted dialog).
- `closeOnEscape`
- type: `boolean | undefined`
- default: `true`
- description: Whether to close the dialog when the escape key is pressed
- `open`
- type: `boolean | undefined`
- `defaultOpen`
- type: `boolean | undefined`
- `onOpenChange`
- type: `((open: boolean, details?: DialogChangeDetails) => void) | undefined`
### `AlertDialogTrigger` \[#alertdialogtrigger]
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### `AlertDialogContent` \[#alertdialogcontent]
- `layerIndex`
- type: `number | undefined`
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### `AlertDialogHeader` \[#alertdialogheader]
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### `AlertDialogTitle` \[#alertdialogtitle]
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### `AlertDialogDescription` \[#alertdialogdescription]
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
### `AlertDialogFooter` \[#alertdialogfooter]
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
## Examples \[#examples]
### Trigger \[#trigger]
``는 `aria-haspopup="dialog"` 속성을 설정하고, AlertDialog의 `open` 상태에 따라 `aria-expanded` 속성을 자동으로 설정합니다. 이 속성은 스크린 리더와 같은 보조 기술에 유용합니다.
## Preview
```tsx
import { ResponsivePair } from "@seed-design/react";
import { ActionButton } from "seed-design/ui/action-button";
import {
AlertDialogAction,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogRoot,
AlertDialogTitle,
AlertDialogTrigger,
} from "seed-design/ui/alert-dialog";
const AlertDialogSingle = () => {
return (
// You can set z-index dialog with "--layer-index" custom property. useful for stackflow integration.
열기주의이 작업은 되돌릴 수 없습니다.취소확인
);
};
export default AlertDialogSingle;
```
### Responsive Wrapping \[#responsive-wrapping]
`` 컴포넌트를 사용해 버튼 컨텐츠가 길어지는 경우 레이아웃을 세로로 접을 수 있습니다.
```tsx
import { PrefixIcon, ResponsivePair } from "@seed-design/react";
import { IconCheckFill } from "@seed-design/react-icon";
import { ActionButton } from "seed-design/ui/action-button";
import {
AlertDialogAction,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogRoot,
AlertDialogTitle,
AlertDialogTrigger,
} from "seed-design/ui/alert-dialog";
const AlertDialogWrap = () => {
return (
// You can set z-index dialog with "--layer-index" custom property. useful for stackflow integration.
열기Wrapping
ResponsivePair 컴포넌트를 사용해 버튼 컨텐츠가 길어지는 경우 레이아웃을 세로로 접을 수
있습니다.
취소} />긴 레이블 예시
);
};
export default AlertDialogWrap;
```
### Single Action \[#single-action]
```tsx
import { ActionButton } from "seed-design/ui/action-button";
import {
AlertDialogAction,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogRoot,
AlertDialogTitle,
AlertDialogTrigger,
} from "seed-design/ui/alert-dialog";
const AlertDialogSingle = () => {
// You can set z-index dialog with "--layer-index" custom property. useful for stackflow integration.
return (
열기제목단일 선택지를 제공합니다.확인
);
};
export default AlertDialogSingle;
```
### Neutral Secondary Action \[#neutral-secondary-action]
```tsx
import { ResponsivePair } from "@seed-design/react";
import { ActionButton } from "seed-design/ui/action-button";
import {
AlertDialogAction,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogRoot,
AlertDialogTitle,
AlertDialogTrigger,
} from "seed-design/ui/alert-dialog";
const AlertDialogNeutral = () => {
return (
// You can set z-index dialog with "--layer-index" custom property. useful for stackflow integration.
열기제목중립적인 선택지를 제공합니다.
{/* ResponsivePair component wraps layout if button content is too long. */}
취소확인
);
};
export default AlertDialogNeutral;
```
### Nonpreferred \[#nonpreferred]
```tsx
import { VStack } from "@seed-design/react";
import { ActionButton } from "seed-design/ui/action-button";
import {
AlertDialogAction,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogRoot,
AlertDialogTitle,
AlertDialogTrigger,
} from "seed-design/ui/alert-dialog";
const AlertDialogNonpreferred = () => {
return (
// You can set z-index dialog with "--layer-index" custom property. useful for stackflow integration.
열기제목중립적인 선택지를 제공합니다.
라벨
라벨
);
};
export default AlertDialogNonpreferred;
```
### Critical Action \[#critical-action]
```tsx
import { ResponsivePair } from "@seed-design/react";
import { ActionButton } from "seed-design/ui/action-button";
import {
AlertDialogAction,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogRoot,
AlertDialogTitle,
AlertDialogTrigger,
} from "seed-design/ui/alert-dialog";
const AlertDialogCritical = () => {
return (
// You can set z-index dialog with "--layer-index" custom property. useful for stackflow integration.
열기제목파괴적, 비가역적 작업을 경고합니다.
{/* ResponsivePair component wraps layout if button content is too long. */}
취소확인
);
};
export default AlertDialogCritical;
```
### Controlled \[#controlled]
Trigger 외의 방식으로 AlertDialog를 열고 닫을 수 있습니다. 이 경우 `open` prop을 사용하여 AlertDialog의 상태를 제어합니다.
```tsx
import { ResponsivePair } from "@seed-design/react";
import { useState } from "react";
import { ActionButton } from "seed-design/ui/action-button";
import {
AlertDialogAction,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogRoot,
AlertDialogTitle,
} from "seed-design/ui/alert-dialog";
const AlertDialogControlled = () => {
const [open, setOpen] = useState(false);
return (
<>
setOpen(true)}>
열기
주의이 작업은 되돌릴 수 없습니다. setOpen(false)}>
취소
setOpen(false)}>
확인
>
);
};
export default AlertDialogControlled;
```
### Prevent Close \[#prevent-close]
`AlertDialogAction`의 `onClick`에서 `e.preventDefault()`를 호출하면 다이얼로그가 닫히지 않습니다.
```tsx
import { Box, VStack } from "@seed-design/react";
import { useState } from "react";
import { ActionButton } from "seed-design/ui/action-button";
import {
AlertDialogAction,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogRoot,
AlertDialogTitle,
AlertDialogTrigger,
} from "seed-design/ui/alert-dialog";
import { Switch } from "seed-design/ui/switch";
export default function AlertDialogPreventClose() {
const [preventClose, setPreventClose] = useState(true);
return (
열기닫기 방지
확인 버튼을 눌러도 다이얼로그가 닫히지 않도록 설정할 수 있습니다.
{
if (preventClose) {
e.preventDefault();
}
}}
>
확인
);
}
```
### `onOpenChange` Details \[#onopenchange-details]
`onOpenChange` 두 번째 인자로 `details`가 제공됩니다.
#### `reason` \[#reason]
**열릴 때** (`open: true`)
- `"trigger"`: `AlertDialogTrigger` (`Dialog.Trigger`)로 열림
**닫힐 때** (`open: false`)
- `"closeButton"`: `AlertDialogAction`으로 닫힘
- `"escapeKeyDown"`: ESC 키 사용
- `"interactOutside"`: 외부 영역 클릭
- `AlertDialogRoot`는 기본적으로 `closeOnInteractOutside={false}`입니다. `interactOutside`는 이 옵션을 `true`로 설정한 경우에만 발생할 수 있습니다.
```tsx
import { HStack, ResponsivePair, Text, VStack } from "@seed-design/react";
import { useState } from "react";
import { ActionButton } from "seed-design/ui/action-button";
import {
AlertDialogAction,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogRoot,
AlertDialogTitle,
AlertDialogTrigger,
} from "seed-design/ui/alert-dialog";
export default function AlertDialogOnOpenChangeReason() {
const [open, setOpen] = useState(false);
const [openReason, setOpenReason] = useState(null);
const [closeReason, setCloseReason] = useState(null);
return (
{
setOpen(open);
(open ? setOpenReason : setCloseReason)(details?.reason ?? null);
}}
>
열기알림
ESC 키를 누르거나 버튼을 클릭하여 닫아보세요.
취소확인
마지막 열림 이유: {openReason ?? "-"}
마지막 닫힘 이유: {closeReason ?? "-"}
);
}
```
### Portalled \[#portalled]
Portal은 기본적으로 `document.body`에 렌더링됩니다.
```tsx
import { ResponsivePair, Portal } from "@seed-design/react";
import { ActionButton } from "seed-design/ui/action-button";
import {
AlertDialogAction,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogRoot,
AlertDialogTitle,
AlertDialogTrigger,
} from "seed-design/ui/alert-dialog";
const AlertDialogPortalled = () => {
return (
// You can set z-index dialog with "--layer-index" custom property. useful for stackflow integration.
열기주의이 작업은 되돌릴 수 없습니다.취소확인
);
};
export default AlertDialogPortalled;
```
### Skip Animation \[#skip-animation]
`skipAnimation` prop을 사용하여 AlertDialog의 enter/exit 애니메이션을 건너뛸 수 있습니다.
```tsx
import { ResponsivePair } from "@seed-design/react";
import { ActionButton } from "seed-design/ui/action-button";
import {
AlertDialogAction,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogRoot,
AlertDialogTitle,
AlertDialogTrigger,
} from "seed-design/ui/alert-dialog";
const AlertDialogSkipAnimation = () => {
return (
열기주의이 작업은 되돌릴 수 없습니다.취소확인
);
};
export default AlertDialogSkipAnimation;
```
### Stackflow \[#stackflow]
```tsx
import { useActivityZIndexBase } from "@seed-design/stackflow";
import { type StaticActivityComponentType, useFlow } from "@stackflow/react/future";
import {
AlertDialogAction,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogRoot,
AlertDialogTitle,
} from "seed-design/ui/alert-dialog";
declare module "@stackflow/config" {
interface Register {
ActivityAlertDialogStackflow: {};
}
}
const ActivityAlertDialogStackflow: StaticActivityComponentType<
"ActivityAlertDialogStackflow"
> = () => {
const { pop } = useFlow();
return (
!open && pop()}>
제목Stackflow확인
);
};
export default ActivityAlertDialogStackflow;
```
---
file: components/article.mdx
# Article
Article은 일관된 selection 및 줄바꿈 정책을 사용할 수 있게 돕는 유틸리티 컴포넌트입니다.
## Preview
```tsx
import { Article, Text, VStack } from "@seed-design/react";
export default function ArticlePreview() {
return (
Article은 일관된 selection 및 줄바꿈 정책을 사용할 수 있게 돕는 유틸리티 컴포넌트입니다.
여기를 드래그해서 선택해보세요.
);
}
```
## Usage \[#usage]
```tsx
import { Article } from "@seed-design/react";
```
```tsx
Article
```
## Props \[#props]
[BoxProps](/react/components/layout/box#props)와 동일합니다.
## Examples \[#examples]
### Word Break Behavior \[#word-break-behavior]
[`lang` global attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/lang)를 통해 추론된 언어에 따라 단어 내 줄바꿈(word-break) 동작을 설정합니다.
한국어 문서/요소에서는 한 어절 안에서 줄바꿈이 발생하지 않도록 하고, 그 외 언어는 표준 규칙을 따릅니다. 컨테이너를 벗어날 정도로 긴 단어 안에서는 줄바꿈이 발생합니다. 일본어에서 문장 부호 직전, [스테가나](https://ko.wikipedia.org/wiki/스테가나) 직전, [반복 부호](https://ko.wikipedia.org/wiki/반복_부호) 직전 등 어색한 위치에서 줄바꿈이 발생하지 않도록 조정됩니다.
```tsx
import { Article, Text, VStack } from "@seed-design/react";
export default function ArticleWordBreak() {
return (
ko-KR
단어 내부 줄바꿈 처리를 적절하게 하여 가독성을 높입니다.
이렇게매우긴단어를줄바꿈하지않는경우레이아웃문제를일으킬가능성이있습니다.{" "}
https://www.example.com/this-is-a-very-long-url-that-might-cause-layout-issues-if-the-word-break-is-not-handled-properly?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale
en-US
There are some long words that need to be broken properly to improve readability.
SupercalifragilisticexpialidociousEvenThoughTheSoundOfItIsSomethingQuiteAtrocious{" "}
https://www.example.com/this-is-a-very-long-url-that-might-cause-layout-issues-if-the-word-break-is-not-handled-properly?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale
ja-JP
日本語の禁則処理では、特定の文字の前後で改行を制御します。例えば人々々々と続く場合や、小さい文字ぁぁぁが連続する場合、そして句読点。。。が続く場合の改行位置を確認できます。
また長い文章では自動的に適切な位置で改行されますが々ぁ。などの文字の前では改行されないことを確認してください。{" "}
https://www.example.com/this-is-a-very-long-url-that-might-cause-layout-issues-if-the-word-break-is-not-handled-properly?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale
핸들을 잡고 너비를 조정해보세요.
);
}
```
### User Select Behavior \[#user-select-behavior]
`` 내부 요소는 사용자가 선택(user-select)할 수 있습니다.
```tsx
import { IconExclamationmarkCircleFill } from "@karrotmarket/react-monochrome-icon";
import { Article, Divider, Icon, Text, VStack } from "@seed-design/react";
import { PageBanner } from "seed-design/ui/page-banner";
export default function ArticleSelectable() {
return (
}
description="상위 요소에 `user-select: none;` 스타일 적용됨"
tone="warning"
variant="solid"
/>
Article 밖은 선택할 수 없습니다.
상위 요소에 `user-select: none;` 스타일이 적용되어 있어 이 영역의 텍스트는 선택할 수
없습니다. 길게 탭하거나 더블 클릭해보세요.
Article 안
상위 요소에 `user-select: none;` 스타일이 적용되었지만 Article 내부는 선택할 수
있습니다. 길게 탭하거나 더블 클릭해서 텍스트를 선택해보세요.
Article 밖은 선택할 수 없습니다.
길게 탭하거나 더블 클릭해보세요.
);
}
```
#### Disable User Selection \[#disable-user-selection]
Text 컴포넌트의 [`userSelect="none"` prop](/react/components/typography/text#user-select)을 사용하여 `` 내부 요소를 선택 불가능하게 만들 수 있습니다.
Text 컴포넌트에 대해 자세히 알아봅니다.
```tsx
import { IconExclamationmarkCircleFill } from "@karrotmarket/react-monochrome-icon";
import { Article, Divider, Icon, Text, VStack } from "@seed-design/react";
import { PageBanner } from "seed-design/ui/page-banner";
export default function ArticleSelectable() {
return (
}
description="상위 요소에 `user-select: none;` 스타일 적용됨"
tone="warning"
variant="solid"
/>
Article 밖은 선택할 수 없습니다.
상위 요소에 `user-select: none;` 스타일이 적용되어 있어 이 영역의 텍스트는 선택할 수
없습니다. 길게 탭하거나 더블 클릭해보세요.
Article 안
상위 요소에 `user-select: none;` 스타일이 적용되었지만 Article 내부는 선택할 수
있습니다. 길게 탭하거나 더블 클릭해서 텍스트를 선택해보세요.
이 요소는 Article 내부에 있지만 선택할 수 없습니다.
Article 밖은 선택할 수 없습니다.
길게 탭하거나 더블 클릭해보세요.
);
}
```
#### Prevent `PullToRefresh` or `TabsCarousel` Gestures \[#prevent-pulltorefresh-or-tabscarousel-gestures]
`` 내부 요소는 사용자 선택이 가능합니다. 따라서, 드래그 동작을 통해 내부 요소를 선택 시 의도하지 않은 PTR(당겨서 새로고침) 또는 탭 스와이프 제스처가 발생할 수 있습니다.
`PullToRefresh.preventPull` 또는 `Tabs.carouselPreventDrag`를 ``에 전달하여 Article에서 발생한 이벤트가 제스처를 트리거하지 않도록 할 수 있습니다.
PullToRefresh 컴포넌트에서 제스처를 방지할 영역을 지정하는 방법에 대해 알아봅니다.
TabsCarousel 컴포넌트에서 제스처를 방지할 영역을 지정하는 방법에 대해 알아봅니다.
```tsx
import { VStack, Icon, Text, Article, Divider, PullToRefresh } from "@seed-design/react";
import { type StaticActivityComponentType } from "@stackflow/react/future";
import { AppBar, AppBarMain } from "seed-design/ui/app-bar";
import { AppScreen, AppScreenContent } from "seed-design/ui/app-screen";
import {
PullToRefreshContent,
PullToRefreshIndicator,
PullToRefreshRoot,
} from "seed-design/ui/pull-to-refresh";
import { IconExclamationmarkCircleFill } from "@karrotmarket/react-monochrome-icon";
import { PageBanner } from "seed-design/ui/page-banner";
declare module "@stackflow/config" {
interface Register {
ActivityArticlePreventPull: {};
}
}
const ActivityArticlePreventPull: StaticActivityComponentType<
"ActivityArticlePreventPull"
> = () => {
return (
Pull To Refresh {}}
onPtrRefresh={async () => {
await new Promise((resolve) => setTimeout(resolve, 1000));
}}
>
}
description="상위 요소에 `user-select: none;` 스타일 적용됨"
tone="warning"
variant="solid"
/>
Article
이 요소는 Article 내부에 있으므로 텍스트 선택이 가능합니다. 이 Article은 PTR
제스처를 호출하지 않도록 설정되어 있습니다. 여기를 아래로 끌어 당기면 PTR이
작동하는 대신 텍스트가 선택됩니다.
Article 외부
이 요소는 Article 외부에 있으므로 텍스트 선택이 불가능합니다. 이 요소는 PTR을
호출할 수 있습니다. 여기를 아래로 끌어 당겨보세요.
);
};
export default ActivityArticlePreventPull;
```
```tsx
import { VStack, Icon, Text, Article, Divider, Tabs } from "@seed-design/react";
import { type StaticActivityComponentType } from "@stackflow/react/future";
import { AppBar, AppBarMain } from "seed-design/ui/app-bar";
import { AppScreen, AppScreenContent } from "seed-design/ui/app-screen";
import { TabsCarousel, TabsContent, TabsList, TabsRoot, TabsTrigger } from "seed-design/ui/tabs";
import { IconExclamationmarkCircleFill } from "@karrotmarket/react-monochrome-icon";
import { PageBanner } from "seed-design/ui/page-banner";
declare module "@stackflow/config" {
interface Register {
ActivityArticlePreventDrag: {};
}
}
const ActivityArticlePreventDrag: StaticActivityComponentType<
"ActivityArticlePreventDrag"
> = () => {
return (
TabsTab 1Tab 2}
description="상위 요소에 `user-select: none;` 스타일 적용됨"
tone="warning"
variant="solid"
/>
Article
이 요소는 Article 내부에 있으므로 텍스트 선택이 가능합니다. 이 Article은 Tabs
제스처를 호출하지 않도록 설정되어 있습니다. 여기를 왼쪽으로 스와이프하면 탭이
전환되는 대신 텍스트가 선택됩니다.
Article 외부
이 요소는 Article 외부에 있으므로 텍스트 선택이 불가능합니다. 이 요소는 탭
스와이프를 호출할 수 있습니다. 여기를 왼쪽으로 스와이프해보세요.
안녕하세요!
);
};
export default ActivityArticlePreventDrag;
```
### Using `asChild` or `as` prop \[#using-aschild-or-as-prop]
``은 기본적으로 ``로 렌더링되지만, `asChild` 또는 `as` prop을 사용하여 다른 요소로 변경할 수 있습니다.
`asChild` prop에 대해 자세히 알아봅니다.
```tsx
import { Article, Divider, VStack, Text } from "@seed-design/react";
export default function ArticleAs() {
return (
`as` prop으로 Article을 section으로 변경
Nulla exercitation quis aliqua nostrud.
`asChild` prop으로 Article을 section으로 변경
Elit fugiat elit exercitation laborum id veniam consequat ipsum sit voluptate velit.
);
}
```
---
file: components/aspect-ratio.mdx
# Aspect Ratio
가로(width)가 정해지면 비율에 따라 세로(height)가 자동으로 결정되는 레이아웃 컨테이너입니다.
## Preview
```tsx
import { AspectRatio, Text, VStack } from "@seed-design/react";
export default function AspectRatioPreview() {
return (
4 / 31:116 / 9
);
}
```
## Usage \[#usage]
```tsx
import { AspectRatio } from "@seed-design/react";
```
```tsx
```
## Props \[#props]
- `bg`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- description: Shorthand for \`background\`.
- `background`
- type: `(string & {}) | ScopedColorPalette | ScopedColorBg | ScopedColorBanner | undefined`
- `bgGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- description: Shorthand for \`backgroundGradient\`.
- `backgroundGradient`
- type: `"glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined`
- `bgGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: Shorthand for \`backgroundGradientDirection\`. e.g. \`43deg\`
- `backgroundGradientDirection`
- type: `(string & {}) | "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | undefined`
- description: e.g. \`43deg\`
- `color`
- type: `(string & {}) | ScopedColorFg | ScopedColorPalette | undefined`
- `borderColor`
- type: `(string & {}) | ScopedColorPalette | ScopedColorStroke | undefined`
- `borderWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderTopWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRightWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderBottomWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderLeftWidth`
- type: `0 | (string & {}) | 1 | undefined`
- `borderRadius`
- type: `0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefined`
- `borderTopLeftRadius`
- type: `0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefined`
- `borderTopRightRadius`
- type: `0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefined`
- `borderBottomRightRadius`
- type: `0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefined`
- `borderBottomLeftRadius`
- type: `0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefined`
- `boxShadow`
- type: `(string & {}) | "s1" | "s2" | "s3" | undefined`
- `width`
- type: `ResponsiveValue<(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `minWidth`
- type: `ResponsiveValue<(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `maxWidth`
- type: `ResponsiveValue<(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `height`
- type: `ResponsiveValue<(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `minHeight`
- type: `ResponsiveValue<(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `maxHeight`
- type: `ResponsiveValue<(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `top`
- type: `0 | (string & {}) | undefined`
- `left`
- type: `0 | (string & {}) | undefined`
- `right`
- type: `0 | (string & {}) | undefined`
- `bottom`
- type: `0 | (string & {}) | undefined`
- `padding`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `p`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- description: Shorthand for \`padding\`.
- `paddingX`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `px`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- description: Shorthand for \`paddingX\`.
- `paddingY`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `py`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- description: Shorthand for \`paddingY\`.
- `paddingTop`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | "safeArea"> | undefined`
- `pt`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | "safeArea"> | undefined`
- description: Shorthand for \`paddingTop\`.
- `paddingRight`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `pr`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- description: Shorthand for \`paddingRight\`.
- `paddingBottom`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | "safeArea"> | undefined`
- `pb`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | "safeArea"> | undefined`
- description: Shorthand for \`paddingBottom\`.
- `paddingLeft`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `pl`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- description: Shorthand for \`paddingLeft\`.
- `display`
- type: `ResponsiveValue<"grid" | "none" | "block" | "flex" | "inline-flex" | "inline" | "inline-block"> | undefined`
- `position`
- type: `"fixed" | "relative" | "absolute" | "sticky" | undefined`
- default: `"relative"`
- `overflowX`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- default: `"hidden"`
- `overflowY`
- type: `"hidden" | "visible" | "scroll" | "auto" | undefined`
- default: `"hidden"`
- `zIndex`
- type: `number | (string & {}) | undefined`
- `flexGrow`
- type: `true | 0 | (number & {}) | 1 | undefined`
- description: If true, flex-grow will be set to \`1\`.
- `flexShrink`
- type: `true | 0 | (number & {}) | undefined`
- description: If true, flex-shrink will be set to \`1\`.
- `flexDirection`
- type: `ResponsiveValue<"row" | "column" | "row-reverse" | "column-reverse"> | undefined`
- `flexWrap`
- type: `true | "wrap" | "wrap-reverse" | "nowrap" | undefined`
- description: If true, flex-wrap will be set to \`wrap\`.
- `justifyContent`
- type: `"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | undefined`
- `justifySelf`
- type: `"center" | "start" | "end" | "stretch" | undefined`
- description: In flexbox layout, this property is ignored.
- `alignItems`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `alignContent`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `alignSelf`
- type: `"flex-start" | "flex-end" | "center" | "stretch" | undefined`
- `gap`
- type: `ResponsiveValue<0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText"> | undefined`
- `gridColumn`
- type: `string | undefined`
- `gridRow`
- type: `string | undefined`
- `unstable_transform`
- type: `string | undefined`
- `_active`
- type: `{ bg?: ScopedColorBg | ScopedColorPalette | (string & {}); background?: ScopedColorBg | ScopedColorPalette | (string & {}); } | undefined`
- `bleed`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative margin on all four sides to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedX`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative x-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedY`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative y-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedTop`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative top margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedRight`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative right margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedBottom`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative bottom margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `bleedLeft`
- type: `ResponsiveValue<0 | "asPadding" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {})> | undefined`
- description: Negative left margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. Cannot be combined with any \`margin\*\` prop.
- `margin`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Margin on all four sides. Cannot be combined with any \`bleed\*\` prop.
- `m`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`margin\`. Cannot be combined with any \`bleed\*\` prop.
- `marginX`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Horizontal margin (left + right). Cannot be combined with any \`bleed\*\` prop.
- `mx`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginX\`. Cannot be combined with any \`bleed\*\` prop.
- `marginY`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Vertical margin (top + bottom). Cannot be combined with any \`bleed\*\` prop.
- `my`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginY\`. Cannot be combined with any \`bleed\*\` prop.
- `marginTop`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Top margin. Cannot be combined with any \`bleed\*\` prop.
- `mt`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginTop\`. Cannot be combined with any \`bleed\*\` prop.
- `marginRight`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Right margin. Cannot be combined with any \`bleed\*\` prop.
- `mr`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginRight\`. Cannot be combined with any \`bleed\*\` prop.
- `marginBottom`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Bottom margin. Cannot be combined with any \`bleed\*\` prop.
- `mb`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginBottom\`. Cannot be combined with any \`bleed\*\` prop.
- `marginLeft`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Left margin. Cannot be combined with any \`bleed\*\` prop.
- `ml`
- type: `ResponsiveValue<0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "auto"> | undefined`
- description: Shorthand for \`marginLeft\`. Cannot be combined with any \`bleed\*\` prop.
- `as`
- type: `React.ElementType | undefined`
- `asChild`
- type: `boolean | undefined`
- `hideFrom`
- type: `BreakpointThreshold | undefined`
- `ratio`
- type: `number | undefined`
- default: `4 / 3`
- description: The aspect ratio of the aspect ratio container (width / height).
## Examples \[#examples]
### Ratio \[#ratio]
다양한 비율을 지정할 수 있습니다. `1`은 정사각형, `4/3`은 일반적인 사진 비율, `16/9`는 와이드스크린 비율입니다.
```tsx
import { AspectRatio, Box, HStack } from "@seed-design/react";
export default function AspectRatioRatio() {
return (
);
}
```
---
file: components/attachment-display-field.mdx
# Attachment Display Field
외부 소스에서 제공된 미디어를 URL 기반으로 표시하고 관리하는 컴포넌트입니다.
## Preview
```tsx
import { VStack } from "@seed-design/react";
import type { DisplayItemEntry } from "@seed-design/react/primitive";
import { AttachmentDisplay, AttachmentDisplayField } from "seed-design/ui/attachment-display-field";
const sampleEntries: DisplayItemEntry[] = [
{
id: "1",
thumbnailUrl: "https://picsum.photos/seed/seed1/200/200",
status: "success",
},
{
id: "2",
thumbnailUrl: "https://picsum.photos/seed/seed2/200/200",
status: "success",
},
];
// 외부 미디어 피커 모킹. 실제 환경에서는 네이티브 브릿지/모달/서버 호출 등으로 교체하세요.
async function openMediaPicker(): Promise {
const id = crypto.randomUUID();
return [
{
id,
thumbnailUrl: `https://picsum.photos/seed/${id}/200/200`,
status: "success",
},
];
}
export default function AttachmentDisplayPreview() {
return (
{
addEntries(await openMediaPicker());
}}
/>
);
}
```
## Installation \[#installation]
### Default \[#default]
순서 변경이 불필요한 경우 사용할 수 있는 컴포넌트를 포함합니다.
- npm: npx @seed-design/cli@latest add ui:attachment-display-field
- pnpm: pnpm dlx @seed-design/cli@latest add ui:attachment-display-field
- yarn: yarn dlx @seed-design/cli@latest add ui:attachment-display-field
- bun: bun x @seed-design/cli@latest add ui:attachment-display-field
### Reorderable \[#reorderable]
드래그 앤 드롭을 통한 항목 순서 변경이 필요한 경우 활용할 수 있는 컴포넌트를 포함합니다. 프로젝트에 [dnd-kit](https://dndkit.com/overview) 의존성이 추가됩니다.
- npm: npx @seed-design/cli@latest add ui:attachment-display-field-reorderable
- pnpm: pnpm dlx @seed-design/cli@latest add ui:attachment-display-field-reorderable
- yarn: yarn dlx @seed-design/cli@latest add ui:attachment-display-field-reorderable
- bun: bun x @seed-design/cli@latest add ui:attachment-display-field-reorderable
## Props \[#props]
### `AttachmentDisplayField` \[#attachmentdisplayfield]
- `label`
- type: `React.ReactNode`
- `labelWeight`
- type: `"bold" | "medium" | undefined`
- default: `"medium"`
- `indicator`
- type: `React.ReactNode`
- `description`
- type: `React.ReactNode`
- `errorMessage`
- type: `React.ReactNode`
- `showRequiredIndicator`
- type: `boolean | undefined`
- `disabled`
- type: `boolean | undefined`
- default: `false`
- `invalid`
- type: `boolean | undefined`
- default: `false`
- `readOnly`
- type: `boolean | undefined`
- default: `false`
- `maxEntries`
- type: `number | undefined`
- default: `1`
- `entries`
- type: `DisplayItemEntry[] | undefined`
- `defaultEntries`
- type: `DisplayItemEntry[] | undefined`
- `onEntriesChange`
- type: `((entries: DisplayItemEntry[]) => void) | undefined`
### `AttachmentDisplay` \[#attachmentdisplay]
- `onTriggerClick`
- type: `(helpers: Pick) => void`
- required: `true`
- `children`
- type: `((context: UseAttachmentDisplayContext) => React.ReactNode) | undefined`
- `onRetry`
- type: `((entry: DisplayItemEntry, helpers: Pick) => void) | undefined`
### `AttachmentDisplayItem` \[#attachmentdisplayitem]
- `onRetry`
- type: `(() => void) | undefined`
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
- `entry`
- type: `DisplayItemEntry`
- required: `true`
## Usage \[#usage]
### 기본 사용법 \[#기본-사용법]
`AttachmentDisplayField` 안에 `AttachmentDisplay` 또는 `AttachmentDisplayReorderable`을 조합하여 사용합니다.
`AttachmentDisplay`는 HTML ``을 사용하지 않습니다. `onTriggerClick`으로 외부 미디어 피커를 호출하고, 콜백 인자로 전달되는 `addEntries`에 그 결과를 넘겨 표시하세요. `addEntries`는 `maxEntries` 상한과 single-mode(`maxEntries={1}`) 치환을 내부에서 처리하므로, `entries`를 직접 펼쳐 넣는 것보다 안전합니다.
[`AttachmentField`](/react/components/attachment-field)와 달리 `AttachmentDisplayField`는 파일의 유효성을 검증하거나 파일 객체를 직접 다루지 않습니다.
```tsx
import { AttachmentDisplay, AttachmentDisplayField } from "seed-design/ui/attachment-display-field";
{
const pickedEntries = await openMediaPicker();
addEntries(pickedEntries);
}}
/>
;
```
`entries`와 `onEntriesChange`로 목록을 직접 제어하는 controlled 방식도 지원합니다. 이 경우에도 `addEntries`는 동일하게 동작합니다([Controlled](#controlled) 참고).
### Item 직접 구성하기 \[#item-직접-구성하기]
`AttachmentDisplay`, `AttachmentDisplayReorderable`은 `children`을 render prop으로 사용합니다.
`entries`를 활용하여 `AttachmentDisplayItem`을 직접 렌더링할 수 있습니다. 이때 `DisplayItemEntry` 타입이 제공하는 `id`를 `key`로 활용하는 것을 권장합니다.
`children`을 제공하지 않는 경우 자동으로 `entries`를 `AttachmentDisplayItem`으로 렌더링합니다.
```tsx
import {
AttachmentDisplay,
AttachmentDisplayField,
AttachmentDisplayItem,
} from "seed-design/ui/attachment-display-field";
{
addEntries(await openMediaPicker());
}}
>
{({ entries }) =>
entries.map((entry) => (
))
}
;
```
## Adding Entries \[#adding-entries]
### Trigger \[#trigger]
`AttachmentDisplay`는 trigger(업로드 버튼)가 포함된 레이아웃을 제공합니다. trigger 클릭 시 `onTriggerClick` 콜백이 실행됩니다. 일반적으로 외부 미디어 피커 호출을 수행합니다. 콜백은 `{ addEntries, updateEntryStatus }`를 인자로 받아, 피커 결과를 추가하고 곧바로 업로드 상태를 갱신할 수 있습니다.
```tsx
import type { DisplayItemEntry } from "@seed-design/react/primitive";
import { AttachmentDisplay, AttachmentDisplayField } from "seed-design/ui/attachment-display-field";
const defaultEntries: DisplayItemEntry[] = [
{
id: "1",
thumbnailUrl: "https://picsum.photos/seed/trigger1/200/200",
status: "success",
},
];
// 외부 미디어 피커 모킹. 실제 환경에서는 네이티브 브릿지/모달/서버 호출 등으로 교체하세요.
async function openMediaPicker(): Promise {
const id = crypto.randomUUID();
return [
{
id,
thumbnailUrl: `https://picsum.photos/seed/${id}/200/200`,
status: "success",
},
];
}
export default function AttachmentDisplayTrigger() {
return (
{
addEntries(await openMediaPicker());
}}
/>
);
}
```
### Listening to Entry Changes \[#listening-to-entry-changes]
`entries`는 현재 표시되고 있는 항목의 목록입니다. `onEntriesChange` 콜백으로 `entries`에 등록된 파일 변경 이벤트를 감지할 수 있습니다.
```tsx
"use client";
import { Text, VStack } from "@seed-design/react";
import type { DisplayItemEntry } from "@seed-design/react/primitive";
import { useRef, useState } from "react";
import { AttachmentDisplay, AttachmentDisplayField } from "seed-design/ui/attachment-display-field";
// 외부 미디어 피커 모킹. 실제 환경에서는 네이티브 브릿지/모달/서버 호출 등으로 교체하세요.
async function openMediaPicker(): Promise {
const id = crypto.randomUUID();
return [
{
id,
thumbnailUrl: `https://picsum.photos/seed/${id}/200/200`,
status: "success",
},
];
}
export default function AttachmentDisplayValueChanges() {
const [entries, setEntries] = useState([]);
const entriesRef = useRef(entries);
const [logs, setLogs] = useState([]);
entriesRef.current = entries;
const addLog = (message: string) => {
setLogs((prev) => [...prev, `[${new Date().toLocaleTimeString()}] ${message}`]);
};
// addEntries로 추가하든 제거 버튼으로 지우든 변경은 항상 onEntriesChange로 흐르므로,
// 추가/삭제 감지를 여기 한 곳에서 처리합니다.
const handleEntriesChange = (next: DisplayItemEntry[]) => {
const prev = entriesRef.current;
const added = next.filter((n) => !prev.some((p) => p.id === n.id));
const removed = prev.filter((p) => !next.some((n) => n.id === p.id));
if (added.length > 0) addLog(`added: ${added.map((a) => a.id).join(", ")}`);
if (removed.length > 0) addLog(`removed: ${removed.map((r) => r.id).join(", ")}`);
setEntries(next);
};
return (
{logs.length === 0 ? (
아이템을 추가하거나 삭제하면 로그가 표시됩니다.
) : (
logs.map((log, index) => (
{log}
))
)}
{
addEntries(await openMediaPicker());
}}
/>
);
}
```
## Managing Item Status \[#managing-item-status]
`entries`의 각 항목은 `pending`, `uploading`, `success`, `error`의 status를 가질 수 있습니다. 새로 추가되는 항목의 status 기본값은 의도에 맞게 자유롭게 지정할 수 있습니다(외부 피커가 막 던진 항목이라면 `uploading`, 이미 업로드 완료된 미디어를 hydrate한다면 `success`).
외부 업로드 API와 연동하는 경우, `onTriggerClick`·`onRetry` 콜백으로 함께 전달되는 `updateEntryStatus` 헬퍼를 사용하여 각 항목의 status를 업데이트합니다.
```tsx
"use client";
import { VStack } from "@seed-design/react";
import type { DisplayItemEntry, DisplayItemStatusDetails } from "@seed-design/react/primitive";
import { AttachmentDisplay, AttachmentDisplayField } from "seed-design/ui/attachment-display-field";
const defaultEntries: DisplayItemEntry[] = [
{
id: "1",
thumbnailUrl: "https://picsum.photos/seed/upload1/200/200",
status: "uploading",
progress: 30,
},
{
id: "2",
thumbnailUrl: "https://picsum.photos/seed/upload2/200/200",
status: "success",
},
{
id: "3",
thumbnailUrl: "https://picsum.photos/seed/upload3/200/200",
status: "error",
},
];
// 외부 미디어 피커 모킹. 실제 환경에서는 네이티브 브릿지/모달/서버 호출 등으로 교체하세요.
async function openMediaPicker(): Promise {
const id = crypto.randomUUID();
return [
{
id,
thumbnailUrl: `https://picsum.photos/seed/${id}/200/200`,
status: "uploading",
},
];
}
// 실제 환경에서는 네이티브 브릿지 또는 외부 업로드 API와 연동하세요.
// status는 컴포넌트가 콜백으로 전달하는 updateEntryStatus 헬퍼로만 갱신합니다.
function simulateUpload(
id: string,
updateEntryStatus: (id: string, details: DisplayItemStatusDetails) => void,
) {
updateEntryStatus(id, { status: "uploading", progress: 0 });
let progress = 0;
const interval = setInterval(() => {
progress += 20;
if (progress >= 100) {
clearInterval(interval);
updateEntryStatus(id, Math.random() > 0.5 ? { status: "success" } : { status: "error" });
} else {
updateEntryStatus(id, { status: "uploading", progress });
}
}, 300);
}
export default function AttachmentDisplayStatus() {
return (
{
const pickedEntries = await openMediaPicker();
addEntries(pickedEntries);
for (const entry of pickedEntries) {
simulateUpload(entry.id, updateEntryStatus);
}
}}
onRetry={(entry, { updateEntryStatus }) => simulateUpload(entry.id, updateEntryStatus)}
/>
);
}
```
- `uploading`: [ProgressCircle](/react/components/progress-circle)이 표시됩니다.
- `progress`를 설정하여 업로드 진행률을 표시할 수 있습니다.
- `progress`를 지정하지 않는 경우 [indeterminate](/react/components/progress-circle#indeterminate) 상태로 표시됩니다.
- `error`: 재시도 버튼이 표시됩니다.
- 클릭 시 `AttachmentDisplay`에 지정한 `onRetry` 콜백이 `(entry, { updateEntryStatus })` 인자로 실행됩니다. `updateEntryStatus`로 해당 항목을 다시 `uploading` 상태로 되돌려 업로드를 재시도하세요.
## Reordering Entries \[#reordering-entries]
`AttachmentDisplayReorderable`을 사용하면 드래그로 항목의 순서를 변경할 수 있습니다.
해당 컴포넌트는 `dnd-kit` 의존성 분리를 위해 별도 snippet [`ui:attachment-display-field-reorderable`](#reorderable)로 제공됩니다.
Context를 통해 `reorderEntry`가 제공되므로, 필요한 경우 원하는 드래그 앤 드롭 동작을 직접 구현하거나, 이미 프로젝트에서 사용 중인 드래그 앤 드롭 라이브러리와 연동하여 사용할 수 있습니다.
```tsx
"use client";
import type { DisplayItemEntry } from "@seed-design/react/primitive";
import { useState } from "react";
import { AttachmentDisplayField } from "seed-design/ui/attachment-display-field";
import { AttachmentDisplayReorderable } from "seed-design/ui/attachment-display-field-reorderable";
const defaultEntries: DisplayItemEntry[] = [
{ id: "1", thumbnailUrl: "https://picsum.photos/seed/reorder1/200/200", status: "success" },
{ id: "2", thumbnailUrl: "https://picsum.photos/seed/reorder2/200/200", status: "success" },
{ id: "3", thumbnailUrl: "https://picsum.photos/seed/reorder3/200/200", status: "success" },
];
// 외부 미디어 피커 모킹. 실제 환경에서는 네이티브 브릿지/모달/서버 호출 등으로 교체하세요.
async function openMediaPicker(): Promise {
const id = crypto.randomUUID();
return [
{
id,
thumbnailUrl: `https://picsum.photos/seed/${id}/200/200`,
status: "success",
},
];
}
export default function AttachmentDisplayReorderableExample() {
const [entries, setEntries] = useState(defaultEntries);
return (
{
addEntries(await openMediaPicker());
}}
/>
);
}
```
## Examples \[#examples]
### Disabled \[#disabled]
`disabled` prop으로 trigger 버튼을 비활성화할 수 있습니다.
```tsx
import { VStack } from "@seed-design/react";
import type { DisplayItemEntry } from "@seed-design/react/primitive";
import { AttachmentDisplay, AttachmentDisplayField } from "seed-design/ui/attachment-display-field";
const sampleEntries: DisplayItemEntry[] = [
{
id: "1",
thumbnailUrl: "https://picsum.photos/seed/disabled1/200/200",
status: "success",
},
];
export default function AttachmentDisplayDisabled() {
return (
{}} />
);
}
```
### Read Only \[#read-only]
`readOnly` prop으로 읽기 전용 상태를 표현할 수 있습니다. trigger, 파일 제거 버튼, 순서 변경 모두 비활성화됩니다.
```tsx
import { VStack } from "@seed-design/react";
import type { DisplayItemEntry } from "@seed-design/react/primitive";
import { AttachmentDisplay, AttachmentDisplayField } from "seed-design/ui/attachment-display-field";
const sampleEntries: DisplayItemEntry[] = [
{
id: "1",
thumbnailUrl: "https://picsum.photos/seed/readonly1/200/200",
status: "success",
},
{
id: "2",
thumbnailUrl: "https://picsum.photos/seed/readonly2/200/200",
status: "success",
},
];
export default function AttachmentDisplayReadOnly() {
return (
{}} />
);
}
```
### Controlled \[#controlled]
`entries`와 `onEntriesChange`를 사용하여 외부에서 아이템 목록을 제어할 수 있습니다.
```tsx
"use client";
import { HStack, Text, VStack } from "@seed-design/react";
import type { DisplayItemEntry } from "@seed-design/react/primitive";
import { useState } from "react";
import { ActionButton } from "seed-design/ui/action-button";
import { AttachmentDisplay, AttachmentDisplayField } from "seed-design/ui/attachment-display-field";
// 외부 미디어 피커 모킹. 실제 환경에서는 네이티브 브릿지/모달/서버 호출 등으로 교체하세요.
async function openMediaPicker(): Promise {
const id = crypto.randomUUID();
return [
{
id,
thumbnailUrl: `https://picsum.photos/seed/${id}/200/200`,
status: "success",
},
];
}
export default function AttachmentDisplayControlled() {
const [entries, setEntries] = useState([]);
return (
{
addEntries(await openMediaPicker());
}}
/>
현재 아이템: {entries.length}개 setEntries([])}>
전체 삭제
);
}
```
### Custom Inset \[#custom-inset]
`--seed-attachment-input-extend-x` CSS 변수를 사용하여 스크롤되는 아이템 목록이 레이아웃 바깥으로 빠져나오도록 구성할 수 있습니다.
```tsx
import { vars } from "@seed-design/css/vars";
import { VStack } from "@seed-design/react";
import type { DisplayItemEntry } from "@seed-design/react/primitive";
import { AttachmentDisplay, AttachmentDisplayField } from "seed-design/ui/attachment-display-field";
import { TextField, TextFieldInput } from "seed-design/ui/text-field";
const defaultEntries: DisplayItemEntry[] = Array.from({ length: 8 }, (_, i) => ({
id: String(i + 1),
thumbnailUrl: `https://picsum.photos/seed/inset${i + 1}/200/200`,
status: "success",
}));
export default function AttachmentDisplayCustomInset() {
return (
{
// 외부 미디어 피커 호출 자리
}}
/>
);
}
```
### Field Integration \[#field-integration]
`label`, `description`, `errorMessage` 등 Field 관련 prop을 전달할 수 있습니다.
```tsx
"use client";
import { VStack } from "@seed-design/react";
import type { DisplayItemEntry } from "@seed-design/react/primitive";
import { useState } from "react";
import { AttachmentDisplay, AttachmentDisplayField } from "seed-design/ui/attachment-display-field";
const defaultEntries: DisplayItemEntry[] = [
{ id: "1", thumbnailUrl: "https://picsum.photos/seed/field1/200/200", status: "success" },
];
// 외부 미디어 피커 모킹. 실제 환경에서는 네이티브 브릿지/모달/서버 호출 등으로 교체하세요.
async function openMediaPicker(): Promise {
const id = crypto.randomUUID();
return [
{
id,
thumbnailUrl: `https://picsum.photos/seed/${id}/200/200`,
status: "success",
},
];
}
export default function AttachmentDisplayFieldExample() {
const [entries, setEntries] = useState(defaultEntries);
const invalid = entries.length < 1;
return (
{
addEntries(await openMediaPicker());
}}
/>
);
}
```
### Customizing Items \[#customizing-items]
Snippet이 제공하는 기본 아이템 구성 외에 추가적인 커스터마이징이 필요한 경우, `@seed-design/react`에서 제공하는 `AttachmentDisplay.ItemBadge` 등의 요소를 활용하여 직접 아이템을 구성할 수 있습니다.
아래 예시에서는 `AttachmentDisplay.ItemBadge`를 사용하여 첫 번째 이미지에 "대표사진" 배지를 표시합니다.
```tsx
"use client";
import { IconArrowClockwiseCircularFill, IconXmarkFill } from "@karrotmarket/react-monochrome-icon";
import { AttachmentDisplay as SeedAttachmentDisplay, Icon, VStack } from "@seed-design/react";
import type { DisplayItemEntry } from "@seed-design/react/primitive";
import { AttachmentDisplay, AttachmentDisplayField } from "seed-design/ui/attachment-display-field";
import { ProgressCircle } from "seed-design/ui/progress-circle";
const LABEL_REMOVE = "삭제";
const LABEL_RETRY = "재시도";
function CustomImageItem({
entry,
isCover,
onRetry,
}: {
entry: DisplayItemEntry;
isCover?: boolean;
onRetry?: () => void;
}) {
return (
{isCover && 대표사진}
{(e) => (
)}
{onRetry && (
} />
{LABEL_RETRY}
)}
} />
);
}
const defaultEntries: DisplayItemEntry[] = [
{ id: "1", thumbnailUrl: "https://picsum.photos/seed/customizing1/200/200", status: "success" },
{ id: "2", thumbnailUrl: "https://picsum.photos/seed/customizing2/200/200", status: "success" },
{ id: "3", thumbnailUrl: "https://picsum.photos/seed/customizing3/200/200", status: "success" },
];
export default function AttachmentDisplayCustomizingItems() {
return (
{
// 외부 미디어 피커 호출 자리
}}
>
{({ entries }) =>
entries.map((entry, index) => (
))
}
);
}
```
## Attachment Display Field vs. Attachment Field \[#attachment-display-field-vs-attachment-field]
HTML ``을 사용해야 하는 경우 `AttachmentField`를, 외부 소스와 연동하여 URL 기반으로 미디어를 표시해야 하는 경우 `AttachmentDisplayField`를 사용하세요.
| | Attachment Field | Attachment Display |
| -------------- | -------------------------- | ---------------------------- |
| 미디어 소스 | HTML `` | 이미지 URL |
| 데이터 모델 | `File` 기반 `FileEntry` | URL 기반 `DisplayItemEntry` |
| 파일 선택 | `` | 다루지 않음 (`onTriggerClick` 위임) |
| 드래그 앤 드롭으로 업로드 | `AttachmentDropzone` | 다루지 않음 |
| 파일 검증 | accept, maxFileSize 등 | 다루지 않음 |
| Form 연동 | `` 동기화 | 다루지 않음 |
---
file: components/attachment-field.mdx
# Attachment Field
파일을 선택하거나 드래그 앤 드롭으로 업로드할 수 있는 컴포넌트입니다.
## Preview
```tsx
import { VStack } from "@seed-design/react";
import { AttachmentField, AttachmentInput } from "seed-design/ui/attachment-field";
export default function AttachmentFieldPreview() {
return (
);
}
```
## Installation \[#installation]
### Default \[#default]
파일 순서 변경이 불필요한 경우 사용할 수 있는 컴포넌트를 포함합니다.
- npm: npx @seed-design/cli@latest add ui:attachment-field
- pnpm: pnpm dlx @seed-design/cli@latest add ui:attachment-field
- yarn: yarn dlx @seed-design/cli@latest add ui:attachment-field
- bun: bun x @seed-design/cli@latest add ui:attachment-field
### Reorderable \[#reorderable]
드래그 앤 드롭을 통한 파일 순서 변경이 필요한 경우 활용할 수 있는 컴포넌트를 포함합니다. 프로젝트에 [dnd-kit](https://dndkit.com/overview) 의존성이 추가됩니다.
- npm: npx @seed-design/cli@latest add ui:attachment-field-reorderable
- pnpm: pnpm dlx @seed-design/cli@latest add ui:attachment-field-reorderable
- yarn: yarn dlx @seed-design/cli@latest add ui:attachment-field-reorderable
- bun: bun x @seed-design/cli@latest add ui:attachment-field-reorderable
## Props \[#props]
### `AttachmentField` \[#attachmentfield]
- `label`
- type: `React.ReactNode`
- `labelWeight`
- type: `"bold" | "medium" | undefined`
- default: `"medium"`
- `indicator`
- type: `React.ReactNode`
- `description`
- type: `React.ReactNode`
- `errorMessage`
- type: `React.ReactNode`
- `showRequiredIndicator`
- type: `boolean | undefined`
- `inputProps`
- type: `React.InputHTMLAttributes | undefined`
- `fieldRef`
- type: `React.Ref | undefined`
- `rootProps`
- type: `React.HTMLAttributes | undefined`
- `disabled`
- type: `boolean | undefined`
- default: `false`
- `name`
- type: `string | undefined`
- `invalid`
- type: `boolean | undefined`
- default: `false`
- `readOnly`
- type: `boolean | undefined`
- default: `false`
- `accept`
- type: `string | string[] | undefined`
- description: Accepted file types (e.g., "image/\*", ".pdf", "image/png")
- `required`
- type: `boolean | undefined`
- default: `false`
- `maxFiles`
- type: `number | undefined`
- default: `1`
- `maxFileSize`
- type: `number | undefined`
- default: `Infinity`
- `minFileSize`
- type: `number | undefined`
- default: `0`
- `validate`
- type: `((file: File) => FileError[] | null) | undefined`
- description: Custom validation function.
- `preventDocumentDrop`
- type: `boolean | undefined`
- default: `true`
- description: Whether to prevent the browser's default behavior when files are dropped outside the dropzone (e.g., opening the file in a new tab).
- `acceptedFileEntries`
- type: `FileEntry[] | undefined`
- `defaultAcceptedFileEntries`
- type: `FileEntry[] | undefined`
- `onAcceptedFileEntriesChange`
- type: `((fileEntries: FileEntry[]) => void) | undefined`
- `onFileReject`
- type: `((rejections: FileRejection[]) => void) | undefined`
- `onFileAccept`
- type: `((acceptedEntries: FileEntry[], helpers: { updateFileEntryStatus: (id: string, details: FileStatusDetails) => void; }) => void) | undefined`
### `AttachmentInput` \[#attachmentinput]
- `children`
- type: `((context: UseFileUploadContext) => React.ReactNode) | undefined`
- `onRetry`
- type: `((fileEntry: FileEntry, helpers: Pick) => void) | undefined`
### `AttachmentDropzone` \[#attachmentdropzone]
- `children`
- type: `((context: UseFileUploadContext) => React.ReactNode) | undefined`
- `onRetry`
- type: `((fileEntry: FileEntry, helpers: Pick) => void) | undefined`
### `AttachmentInputItem` \[#attachmentinputitem]
- `onRetry`
- type: `(() => void) | undefined`
- `asChild`
- type: `boolean | undefined`
- default: `false`
- description: Whether the element should be rendered as a child of a slot.
- `type`
- type: `"general" | "image" | undefined`
- default: `"general"`
- `fileEntry`
- type: `FileEntry`
- required: `true`
## Usage \[#usage]
### 기본 사용법 \[#기본-사용법]
`AttachmentField` 안에 `AttachmentInput`, `AttachmentDropzone`, `AttachmentInputReorderable`, `AttachmentDropzoneReorderable` 중 하나를 조합하여 사용합니다.
```tsx
import {
AttachmentField,
AttachmentInput,
AttachmentDropzone,
} from "seed-design/ui/attachment-field";
;
;
```
```tsx
import { AttachmentField } from "seed-design/ui/attachment-field";
import {
AttachmentInputReorderable,
AttachmentDropzoneReorderable,
} from "seed-design/ui/attachment-field-reorderable";
;
;
```
### Item 직접 구성하기 \[#item-직접-구성하기]
`AttachmentInput`, `AttachmentDropzone`, `AttachmentInputReorderable`, `AttachmentDropzoneReorderable`은 `children`을 render prop으로 사용합니다.
`acceptedFileEntries`을 활용하여 `AttachmentInputItem`을 직접 렌더링할 수 있습니다. 이때 `FileEntry` 타입이 제공하는 `id`를 `key`로 활용하는 것을 권장합니다.
`children`을 제공하지 않는 경우 자동으로 `acceptedFileEntries`에 등록된 파일을 `AttachmentInputItem`으로 렌더링합니다.
```tsx
import {
AttachmentField,
AttachmentInput,
AttachmentInputItem,
} from "seed-design/ui/attachment-field";
{({ acceptedFileEntries }) =>
acceptedFileEntries.map((entry) => (
))
}
;
```
## Uploading Files \[#uploading-files]
### Trigger \[#trigger]
`AttachmentInput`를 사용하면 trigger(업로드 버튼)가 포함된 레이아웃을 사용할 수 있습니다.
```tsx
import type { FileEntry } from "@seed-design/react/primitive";
import { AttachmentField, AttachmentInput } from "seed-design/ui/attachment-field";
const defaultAcceptedFileEntries: FileEntry[] = [
{
id: "1",
file: new File(["hello"], "document.pdf", { type: "application/pdf" }),
status: "success",
},
];
export default function AttachmentFieldTriggerExample() {
return (
);
}
```
### Dropzone \[#dropzone]
`AttachmentDropzone`을 사용하면 드래그 앤 드롭 영역이 포함된 레이아웃을 사용할 수 있습니다.
```tsx
import { VStack } from "@seed-design/react";
import type { FileEntry } from "@seed-design/react/primitive";
import { AttachmentField, AttachmentDropzone } from "seed-design/ui/attachment-field";
const defaultAcceptedFileEntries: FileEntry[] = [
{
id: "1",
file: new File(["hello"], "document.pdf", { type: "application/pdf" }),
status: "success",
},
];
export default function AttachmentFieldDropzone() {
return (
);
}
```
### Listening to Accepted File Changes \[#listening-to-accepted-file-changes]
`acceptedFileEntries`는 유효성 검사를 마친 파일의 목록입니다. `onAcceptedFileEntriesChange` 콜백으로 `acceptedFileEntries`에 등록된 파일 변경 이벤트를 감지할 수 있습니다.
```tsx
import { VStack, Text } from "@seed-design/react";
import { useState } from "react";
import type { FileStatusDetails } from "@seed-design/react/primitive";
import {
AttachmentField,
AttachmentInput,
AttachmentInputItem,
} from "seed-design/ui/attachment-field";
function simulateUpload(
_file: File,
id: string,
updateFileEntryStatus: (id: string, details: FileStatusDetails) => void,
) {
updateFileEntryStatus(id, { status: "uploading", progress: 0 });
let progress = 0;
const interval = setInterval(() => {
progress += 25;
if (progress >= 100) {
clearInterval(interval);
updateFileEntryStatus(id, { status: "success" });
} else {
updateFileEntryStatus(id, { status: "uploading", progress });
}
}, 500);
}
export default function AttachmentFieldValueChanges() {
const [logs, setLogs] = useState([]);
const addLog = (message: string) => {
setLogs((prev) => [...prev, `[${new Date().toLocaleTimeString()}] ${message}`]);
};
return (
{logs.length === 0 ? (
파일을 추가하거나 삭제하면 로그가 표시됩니다.
) : (
logs.map((log, index) => (
{log}
))
)}
{
addLog(`onFileAccept: ${entries.map((e) => e.file.name).join(", ")}`);
for (const entry of entries) {
simulateUpload(entry.file, entry.id, updateFileEntryStatus);
}
}}
onAcceptedFileEntriesChange={(files) => {
addLog(
`onAcceptedFileEntriesChange: ${files.map((f) => `${f.file.name} (${f.status})`).join(", ")}`,
);
}}
onFileReject={(files) => {
addLog(
`onFileReject: ${files.map((f) => `${f.file.name} (${f.errors.join(", ")})`).join(", ")}`,
);
}}
>
{({ acceptedFileEntries }) =>
acceptedFileEntries.map((fileEntry) => (
))
}
);
}
```
## Validating Files \[#validating-files]
사용자가 선택한 파일이 `acceptedFileEntries`에 등록되기 전 유효성을 확인할 수 있습니다.
유효하지 않은 파일에 대해 각각 `onFileReject` 콜백이 실행됩니다. 해당 콜백에서 파일과 에러 코드들을 확인하여 에러 메시지를 표시할 수 있습니다.
### Max Files \[#max-files]
`maxFiles`로 업로드 가능한 최대 파일 수를 제한할 수 있습니다. 기본값은 `1`입니다. 최대 수에 도달한 경우 trigger 및 dropzone이 비활성화됩니다.
업로드 가능한 파일의 수보다 많은 파일을 선택한 경우 업로드 가능한 파일까지 `acceptedFileEntries`에 등록됩니다. 나머지 파일에 대해서는 각각 `onFileReject` 콜백이 실행됩니다. 이때 reject된 파일의 에러는 `"TOO_MANY_FILES"`입니다.
```tsx
import { VStack } from "@seed-design/react";
import type { FileEntry } from "@seed-design/react/primitive";
import { AttachmentField, AttachmentInput } from "seed-design/ui/attachment-field";
const defaultAcceptedFileEntries: FileEntry[] = [
{
id: "1",
file: new File(["hello"], "document.pdf", { type: "application/pdf" }),
status: "success",
},
];
export default function AttachmentFieldMaxFiles() {
return (
);
}
```
### Invalid File Type \[#invalid-file-type]
`accept`로 업로드 가능한 파일의 종류를 제한할 수 있습니다.
MIME type(`image/png`, `image/*`) 또는 확장자(`.png`, `.jpg, .jpeg`) 형식을 지정할 수 있으며, `string[]`을 전달하는 경우 각 `string` `,`로 join합니다.
``에 등록되는 `accept` 속성을 통해 사용자가 선택할 수 있는 파일의 종류를 제한하는 것은 브라우저 UI에서만 동작하는 편의 기능입니다. 따라서 사용자는 브라우저 파일 선택 다이얼로그의 `모든 파일 보기`와 같은 기능을 통해 제한된 종류의 파일도 선택할 수 있습니다. 이렇게 선택된 파일의 경우 `"INVALID_TYPE"` 에러와 함께 `onFileReject` 콜백이 실행됩니다.
파일 종류 검증이 필요한 경우 해당 검증은 서버에서도 수행되어야 합니다.
```tsx
import { useState } from "react";
import { VStack } from "@seed-design/react";
import { AttachmentField, AttachmentInput } from "seed-design/ui/attachment-field";
function getErrorMessage(errorCode: string): string {
switch (errorCode) {
case "INVALID_TYPE":
return "지원하지 않는 파일 형식입니다";
default:
return "업로드에 실패했습니다";
}
}
export default function AttachmentFieldInvalidFileType() {
const [errorMessage, setErrorMessage] = useState();
return (
setErrorMessage(undefined)}
onFileReject={(files) => {
const messages = files.map(
({ file, errors }) => `"${file.name}": ${errors.map(getErrorMessage).join(", ")}`,
);
setErrorMessage(messages.join("\n"));
}}
>
);
}
```
### File Size \[#file-size]
`minFileSize`, `maxFileSize` prop을 활용할 수 있습니다.
- 사용자가 선택한 파일이 `minFileSize`보다 작은 경우 `"FILE_TOO_SMALL"` 에러와 함께 `onFileReject` 콜백이 실행됩니다.
- 사용자가 선택한 파일이 `maxFileSize`보다 큰 경우 `"FILE_TOO_LARGE"` 에러와 함께 `onFileReject` 콜백이 실행됩니다.
```tsx
import { useState } from "react";
import { VStack } from "@seed-design/react";
import { AttachmentField, AttachmentInput } from "seed-design/ui/attachment-field";
import { formatBytes } from "seed-design/lib/format-bytes";
const MIN_FILE_SIZE = 1 * 1024; // 1KB
const MAX_FILE_SIZE = 10 * 1024; // 10KB
function getErrorMessage(errorCode: string): string {
switch (errorCode) {
case "FILE_TOO_LARGE":
return `크기가 ${formatBytes(MAX_FILE_SIZE)}를 초과합니다`;
case "FILE_TOO_SMALL":
return `크기가 ${formatBytes(MIN_FILE_SIZE)} 미만입니다`;
case "TOO_MANY_FILES":
return "업로드 가능한 파일 개수를 초과했습니다";
default:
return "업로드에 실패했습니다";
}
}
export default function AttachmentFieldValidation() {
const [errorMessage, setErrorMessage] = useState();
return (
setErrorMessage(undefined)}
onFileReject={(files) => {
const messages = files.map(
({ file, errors }) => `"${file.name}": ${errors.map(getErrorMessage).join(", ")}`,
);
setErrorMessage(messages.join("\n"));
}}
>
);
}
```
### Custom Validation \[#custom-validation]
`validate` prop으로 각 파일에 대한 유효성 검사를 직접 추가할 수 있습니다. 커스텀 에러 코드를 반환하여 `onFileReject`에서 에러 종류별로 메시지를 분기할 수 있습니다.
```tsx
import { useState } from "react";
import { VStack } from "@seed-design/react";
import { AttachmentField, AttachmentInput } from "seed-design/ui/attachment-field";
function validateFileName(file: File) {
const nameWithoutExt = file.name.replace(/\.[^.]+$/, "");
if (nameWithoutExt.length > 8) {
return ["FILENAME_TOO_LONG"];
}
return null;
}
export default function AttachmentFieldCustomValidation() {
const [errorMessage, setErrorMessage] = useState();
return (
setErrorMessage(undefined)}
onFileReject={(files) => {
if (files.every((f) => f.errors.includes("FILENAME_TOO_LONG")) === false) {
return;
}
const names = files.map((f) => f.file.name).join(", ");
setErrorMessage(`"${names}"은(는) 파일 이름이 8자를 초과합니다.`);
}}
>
);
}
```
## Managing File Status \[#managing-file-status]
`acceptedFileEntries`의 각 항목은 `pending`, `uploading`, `success`, `error`의 status를 가질 수 있습니다. 새로 추가되는 항목의 status 기본값은 `pending`입니다.
파일 선택 직후 외부 업로드 API와 연동하는 경우, 사용자에게 각 파일 항목의 업로딩 상태를 보여줄 수 있습니다. `onFileAccept` 콜백에서 새로 추가된 파일을 받고, 함께 제공되는 `updateFileEntryStatus` 헬퍼를 사용하여 항목의 status를 업데이트합니다.
```tsx
import { useCallback } from "react";
import { VStack } from "@seed-design/react";
import type { FileStatusDetails } from "@seed-design/react/primitive";
import {
AttachmentField,
AttachmentInput,
AttachmentInputItem,
} from "seed-design/ui/attachment-field";
// 실제 환경에서는 fetch 등으로 교체하세요.
async function uploadFile(
file: File,
onProgress: (progress: number) => void,
): Promise<{ url: string }> {
const totalChunks = 5;
for (let i = 1; i <= totalChunks; i++) {
await new Promise((r) => setTimeout(r, 200 + Math.random() * 300));
onProgress(Math.round((i / totalChunks) * 100));
}
if (Math.random() > 0.5) {
throw new Error("Network error");
}
return { url: `https://example.com/uploads/${file.name}` };
}
export default function AttachmentFieldStatus() {
const startUpload = useCallback(
(
file: File,
id: string,
updateFileEntryStatus: (id: string, details: FileStatusDetails) => void,
) => {
updateFileEntryStatus(id, { status: "uploading", progress: 0 });
uploadFile(file, (progress) => {
updateFileEntryStatus(id, { status: "uploading", progress });
})
.then(() => updateFileEntryStatus(id, { status: "success" }))
.catch(() => updateFileEntryStatus(id, { status: "error" }));
},
[],
);
return (
{
for (const entry of entries) {
startUpload(entry.file, entry.id, updateFileEntryStatus);
}
}}
>
{({ acceptedFileEntries, updateFileEntryStatus }) =>
acceptedFileEntries.map((fileEntry) => (
startUpload(fileEntry.file, fileEntry.id, updateFileEntryStatus)}
/>
))
}
);
}
```
- `uploading`: [ProgressCircle](/react/components/progress-circle)이 표시됩니다.
- `progress`를 설정하여 업로드 진행률을 표시할 수 있습니다.
- `progress`를 지정하지 않는 경우 [indeterminate](/react/components/progress-circle#indeterminate) 상태로 표시됩니다.
- `error`: 재시도 버튼이 표시됩니다.
- 클릭 시 `AttachmentInputItem`에 지정한 `onRetry` 콜백이 실행됩니다.
유효성 검증에 성공한 파일 항목은 status와 관계없이 `acceptedFileEntries`에 유지되므로, 네이티브 form 제출 시 포함됩니다.
## Reordering Files \[#reordering-files]
`AttachmentInputReorderable` 또는 `AttachmentDropzoneReorderable`을 사용하면 드래그로 파일의 순서를 변경할 수 있습니다.
두 컴포넌트는 `dnd-kit` 의존성 분리를 위해 별도 snippet [`ui:attachment-field-reorderable`](#reorderable)로 제공됩니다.
Context를 통해 `reorderFileEntry`가 제공되므로, 필요한 경우 원하는 드래그 앤 드롭 동작을 직접 구현하거나, 이미 프로젝트에서 사용 중인 드래그 앤 드롭 라이브러리와 연동하여 사용할 수 있습니다.
```tsx
import type { FileEntry } from "@seed-design/react/primitive";
import { AttachmentField } from "seed-design/ui/attachment-field";
import { AttachmentInputReorderable } from "seed-design/ui/attachment-field-reorderable";
function createMockImageFile(name: string, base64: string): File {
const bytes = Uint8Array.from(atob(base64), (c) => c.charCodeAt(0));
return new File([bytes], name, { type: "image/png" });
}
const defaultAcceptedFileEntries: FileEntry[] = [
{
id: "1",
file: createMockImageFile(
"sunset-landscape.png",
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGN4FcEDAAN+AU+hW/ICAAAAAElFTkSuQmCC",
),
status: "success",
},
{
id: "2",
file: createMockImageFile(
"city-night.png",
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGOYbPwKAAMNAbHKe2UaAAAAAElFTkSuQmCC",
),
status: "success",
},
{
id: "3",
file: createMockImageFile(
"morning-coffee.png",
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGN4tZkDAAQwAaYlKXDxAAAAAElFTkSuQmCC",
),
status: "success",
},
];
export default function AttachmentFieldReorderableExample() {
return (
);
}
```
## Examples \[#examples]
### Showing Thumbnails \[#showing-thumbnails]
파일 이름 및 크기 대신 이미지 미리보기를 표시하려면 `accept`를 `"image/*"`, `["image/png", "image/jpeg"]` 등으로 설정하여 사용자가 이미지 파일만 선택할 수 있도록 제한합니다.
```tsx
import { VStack } from "@seed-design/react";
import { AttachmentField, AttachmentInput } from "seed-design/ui/attachment-field";
export default function AttachmentFieldAcceptImage() {
return (
);
}
```
[`"image/heic"`](https://caniuse.com/heif) 등 일부 이미지 형식은 브라우저에
따라 이미지 미리보기가 표시되지 않을 수 있습니다.
### Disabled \[#disabled]
`disabled` prop으로 trigger 및 dropzone을 비활성화하여 신규 파일 선택을 차단하고, ``을 `disabled` 처리하여 폼 제출 시 값이 전송되지 않도록 합니다.
```tsx
import { VStack } from "@seed-design/react";
import type { FileEntry } from "@seed-design/react/primitive";
import { AttachmentField, AttachmentInput } from "seed-design/ui/attachment-field";
const defaultFiles: FileEntry[] = [
{
id: "mock-1",
file: new File(["hello"], "document.pdf", { type: "application/pdf" }),
status: "success",
},
{
id: "mock-2",
file: new File(["world"], "image.png", { type: "image/png" }),
status: "success",
},
];
export default function AttachmentFieldDisabled() {
return (
);
}
```
### Read Only \[#read-only]
`readOnly` prop으로 첨부된 파일을 읽기 전용 상태로 표시할 수 있습니다. trigger, dropzone, 파일 제거 버튼, 순서 변경 모두 비활성화되지만 ``의 값은 유지되어 form 제출 시 함께 전송됩니다.
```tsx
import { VStack } from "@seed-design/react";
import type { FileEntry } from "@seed-design/react/primitive";
import { AttachmentField, AttachmentInput } from "seed-design/ui/attachment-field";
const defaultFiles: FileEntry[] = [
{
id: "mock-1",
file: new File(["hello"], "document.pdf", { type: "application/pdf" }),
status: "success",
},
{
id: "mock-2",
file: new File(["world"], "image.png", { type: "image/png" }),
status: "success",
},
];
export default function AttachmentFieldReadOnly() {
return (
);
}
```
### Controlled \[#controlled]
`acceptedFileEntries`와 `onAcceptedFileEntriesChange`를 사용하여 외부에서 파일 목록을 제어할 수 있습니다.
```tsx
import { VStack, HStack, Text } from "@seed-design/react";
import { useState } from "react";
import { ActionButton } from "seed-design/ui/action-button";
import type { FileEntry } from "@seed-design/react/primitive";
import { AttachmentField, AttachmentInput } from "seed-design/ui/attachment-field";
export default function AttachmentFieldControlled() {
const [acceptedFileEntries, setAcceptedFileEntries] = useState([]);
return (
현재 파일: {JSON.stringify(acceptedFileEntries.map((f) => f.file.name))} setAcceptedFileEntries([])}
>
전체 삭제
);
}
```
### Custom Inset \[#custom-inset]
`--seed-attachment-input-extend-x` CSS 변수를 사용하여 스크롤되는 아이템 목록이 레이아웃 바깥으로 빠져나오도록 구성할 수 있습니다.
```tsx
import { VStack } from "@seed-design/react";
import { AttachmentField, AttachmentInput } from "seed-design/ui/attachment-field";
import { TextField, TextFieldInput } from "seed-design/ui/text-field";
import { vars } from "@seed-design/css/vars";
const mockedFiles = Array.from({ length: 8 }, (_, i) => {
const file = new File(["file content"], `file${i + 1}.txt`, { type: "text/plain" });
Object.defineProperty(file, "size", { value: 1 });
return file;
});
export default function AttachmentFieldCustomInset() {
return (
({
id: `${index}`,
file,
status: "pending",
}))}
rootProps={{
style: {
"--seed-attachment-input-extend-x": vars.$dimension.spacingX.globalGutter,
} as React.CSSProperties,
}}
>
);
}
```
### Field Integration \[#field-integration]
`label`, `description`, `errorMessage` 등의 Field 관련 prop을 사용할 수 있습니다.
```tsx
import { Divider, VStack } from "@seed-design/react";
import { AttachmentField, AttachmentInput } from "seed-design/ui/attachment-field";
export default function AttachmentFieldField() {
return (
);
}
```
### Form (Uncontrolled) \[#form-uncontrolled]
`acceptedFileEntries`에 등록된 파일이 ``의 `files`로 동기화되므로 `