file: ./content/react/components/action-button.mdx # Action Button 사용자가 특정 액션을 실행할 수 있도록 도와주는 컴포넌트입니다. ```tsx import { ActionButton } from "seed-design/ui/action-button"; export default function ActionButtonPreview() { return 라벨; } ``` ## Installation ## Props

{"버튼에 등록된 비동기 작업이 진행 중임을 사용자에게 알립니다."}

}, disabled: { "type": "boolean", "default": "false", description: <>

{"버튼의 비활성화 여부를 나타냅니다."}

}, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

}, flexGrow: { "type": "0 | 1 | (number & {})", "default": undefined } }} /> ## Examples ### Brand Solid ```tsx import { ActionButton } from "seed-design/ui/action-button"; export default function ActionButtonBrandSolid() { return 라벨; } ``` ### Neutral Solid ```tsx import { ActionButton } from "seed-design/ui/action-button"; export default function ActionButtonNeutralSolid() { return 라벨; } ``` ### Neutral Weak ```tsx import { ActionButton } from "seed-design/ui/action-button"; export default function ActionButtonNeutralWeak() { return 라벨; } ``` ### Critical Solid ```tsx import { ActionButton } from "seed-design/ui/action-button"; export default function ActionButtonCriticalSolid() { return 라벨; } ``` ### Brand Outline ```tsx import { ActionButton } from "seed-design/ui/action-button"; export default function ActionButtonBrandOutline() { return 라벨; } ``` ### Neutral Outline ```tsx import { ActionButton } from "seed-design/ui/action-button"; export default function ActionButtonNeutralOutline() { return 라벨; } ``` ### 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 ```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 ```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 ```tsx import { ActionButton } from "seed-design/ui/action-button"; export default function ActionButtonDisabled() { return 라벨; } ``` ### 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 ( 시간이 걸리는 액션 ); } ``` file: ./content/react/components/action-chip.mdx # Action Chip 사용자가 특정 액션을 실행할 수 있도록 도와주는 Pill 형태의 컴포넌트입니다. ```tsx import { ActionChip } from "@seed-design/react"; export default function ActionChipPreview() { return 라벨; } ``` ## Usage ```tsx import { ActionChip } from "@seed-design/react"; ``` ```tsx ``` ## Props

{"Whether the element should be rendered as a child of a slot."}

} }} /> ## Examples ### Medium ```tsx import { ActionChip } from "@seed-design/react"; export default function ActionChipMedium() { return 라벨; } ``` ### Small ```tsx import { ActionChip } from "@seed-design/react"; export default function ActionChipSmall() { return 라벨; } ``` ### Icon Only ```tsx import { IconPlusFill } from "@karrotmarket/react-monochrome-icon"; import { ActionChip, Icon } from "@seed-design/react"; export default function ActionChipIconOnly() { return ( } /> ); } ``` ### Prefix Icon ```tsx import { IconPlusFill } from "@karrotmarket/react-monochrome-icon"; import { ActionChip, PrefixIcon } from "@seed-design/react"; export default function ActionChipPrefixIcon() { return ( } /> 라벨 ); } ``` ### Suffix Icon ```tsx import { IconChevronDownFill } from "@karrotmarket/react-monochrome-icon"; import { ActionChip, SuffixIcon } from "@seed-design/react"; export default function ActionChipSuffixIcon() { return ( 라벨 } /> ); } ``` file: ./content/react/components/action-sheet.mdx # Action Sheet Action Sheet는 사용자의 작업과 관련된 선택지를 제공하는 시트 형태의 컴포넌트입니다. ```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 ## Props ### `ActionSheetRoot`

{"The role of the dialog."}

}, closeOnInteractOutside: { "type": "boolean", "default": "true", description: <>

{"Whether to close the dialog when the outside is clicked"}

}, closeOnEscape: { "type": "boolean", "default": "true", description: <>

{"Whether to close the dialog when the escape key is pressed"}

}, lazyMount: { "type": "boolean", "default": "false", description: <>

{"Whether to enable lazy mounting"}

}, unmountOnExit: { "type": "boolean", "default": "false", description: <>

{"Whether to unmount on exit."}

}, open: { "type": "boolean", "default": undefined }, defaultOpen: { "type": "boolean", "default": undefined }, onOpenChange: { "type": "((open: boolean) => void)", "default": undefined } }} /> ### `ActionSheetContent`

{"Whether the element should be rendered as a child of a slot."}

} }} /> ### `ActionSheetItem` file: ./content/react/components/alert-dialog.mdx # Alert Dialog 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```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; ``` ## Installation ## Props

{"The role of the dialog."}

}, closeOnInteractOutside: { "type": "boolean", "default": "true", description: <>

{"Whether to close the dialog when the outside is clicked"}

}, closeOnEscape: { "type": "boolean", "default": "true", description: <>

{"Whether to close the dialog when the escape key is pressed"}

}, lazyMount: { "type": "boolean", "default": "false", description: <>

{"Whether to enable lazy mounting"}

}, unmountOnExit: { "type": "boolean", "default": "false", description: <>

{"Whether to unmount on exit."}

}, open: { "type": "boolean", "default": undefined }, defaultOpen: { "type": "boolean", "default": undefined }, onOpenChange: { "type": "((open: boolean) => void)", "default": undefined } }} /> ## Examples ### 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 ```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 ```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; ``` ### 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; ``` ### Stackflow ```tsx import { useActivity } from "@stackflow/react"; import { ActivityComponentType, 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 { "alert-dialog-stackflow": unknown; } } const AlertDialogStackflow: ActivityComponentType<"alert-dialog-stackflow"> = () => { const activity = useActivity(); const { pop } = useFlow(); return ( !open && pop()}> 제목 Stackflow 확인 ); }; export default AlertDialogStackflow; ``` file: ./content/react/components/avatar.mdx # Avatar Avatar는 사용자, 조직과 같은 고유한 아이덴티티를 표현하는 컴포넌트입니다. ```tsx import { Flex } from "@seed-design/react"; import { Avatar, AvatarBadge } from "seed-design/ui/avatar"; import { IdentityPlaceholder } from "seed-design/ui/identity-placeholder"; export default function AvatarPreview() { return ( } >
} /> ); } ``` ## Installation ## Props void)", "default": undefined }, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

} }} /> ## Examples ### Size ```tsx import { Flex } from "@seed-design/react"; import { Avatar } from "seed-design/ui/avatar"; export default function AvatarSize() { return ( ); } ``` ### Badge (Circle) ```tsx import { IdentityPlaceholder } from "seed-design/ui/identity-placeholder"; import { Avatar, AvatarBadge } from "seed-design/ui/avatar"; import { Box } from "@seed-design/react"; export default function AvatarBadgeCircle() { return ( } > ); } ``` ### Badge (Flower) ```tsx import { IdentityPlaceholder } from "seed-design/ui/identity-placeholder"; import { Avatar, AvatarBadge } from "seed-design/ui/avatar"; export default function AvatarBadgeFlower() { return ( } > 뱃지를 설명하는 대체 텍스트를 제공해야 합니다. ); } ``` ### Badge (Shield) ```tsx import { Avatar, AvatarBadge } from "seed-design/ui/avatar"; import { IdentityPlaceholder } from "seed-design/ui/identity-placeholder"; export default function AvatarBadgeShield() { return ( } > 뱃지를 설명하는 대체 텍스트를 제공해야 합니다. ); } ``` ### Stack ```tsx import { Avatar, AvatarStack } from "seed-design/ui/avatar"; import { IdentityPlaceholder } from "seed-design/ui/identity-placeholder"; export default function AvatarStackExample() { return ( } /> } /> } /> } /> ); } ``` file: ./content/react/components/badge.mdx # Badge Badge는 객체의 속성이나 상태를 시각적으로 표현하는 작은 텍스트 라벨입니다. 사용자의 주의를 끌고 콘텐츠의 빠른 인지와 탐색을 돕기 위해 사용됩니다. ```tsx import { Badge } from "@seed-design/react"; export default function BadgePreview() { return 라벨; } ``` ## Usage ```tsx import { Badge } from "@seed-design/react"; ``` ```tsx Badge ``` ## Props

{"Whether the element should be rendered as a child of a slot."}

} }} /> ## Examples ### Medium ```tsx import { Badge } from "@seed-design/react"; export default function BadgeMedium() { return 라벨; } ``` ### Large ```tsx import { Badge } from "@seed-design/react"; export default function BadgeLarge() { return 라벨; } ``` ### Weak ```tsx import { Badge } from "@seed-design/react"; export default function BadgeWeak() { return 라벨; } ``` ### Solid ```tsx import { Badge } from "@seed-design/react"; export default function BadgeSolid() { return 라벨; } ``` ### Outline ```tsx import { Badge } from "@seed-design/react"; export default function BadgeOutline() { return 라벨; } ``` ### Neutral ```tsx import { Badge } from "@seed-design/react"; export default function BadgeNeutral() { return 라벨; } ``` ### Brand ```tsx import { Badge } from "@seed-design/react"; export default function BadgeBrand() { return 라벨; } ``` ### Informative ```tsx import { Badge } from "@seed-design/react"; export default function BadgeInformative() { return 라벨; } ``` ### Positive ```tsx import { Badge } from "@seed-design/react"; export default function BadgePositive() { return 라벨; } ``` ### Critical ```tsx import { Badge } from "@seed-design/react"; export default function BadgeCritical() { return 라벨; } ``` ### asChild ```tsx import { Badge } from "@seed-design/react"; export default function BadgeAsChild() { return ( 링크 ); } ``` file: ./content/react/components/bottom-sheet.mdx # Bottom Sheet 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { ActionButton } from "seed-design/ui/action-button"; import { BottomSheetBody, BottomSheetContent, BottomSheetFooter, BottomSheetRoot, BottomSheetTrigger, } from "seed-design/ui/bottom-sheet"; const BottomSheetPreview = () => { return ( Open {/* If you need to omit padding, pass px={0}. */} Content 확인 ); }; export default BottomSheetPreview; ``` ## Installation ## Props

{"The role of the dialog."}

}, closeOnInteractOutside: { "type": "boolean", "default": "true", description: <>

{"Whether to close the dialog when the outside is clicked"}

}, closeOnEscape: { "type": "boolean", "default": "true", description: <>

{"Whether to close the dialog when the escape key is pressed"}

}, lazyMount: { "type": "boolean", "default": "false", description: <>

{"Whether to enable lazy mounting"}

}, unmountOnExit: { "type": "boolean", "default": "false", description: <>

{"Whether to unmount on exit."}

}, open: { "type": "boolean", "default": undefined }, defaultOpen: { "type": "boolean", "default": undefined }, onOpenChange: { "type": "((open: boolean) => void)", "default": undefined } }} /> file: ./content/react/components/callout.mdx # Callout 사용자의 주목을 끌어 중요한 정보를 강조하는 컴포넌트에요. ```tsx import { VStack } from "@seed-design/react"; import { ActionableCallout, Callout, DismissibleCallout } from "seed-design/ui/callout"; export default function CalloutPreview() { return ( ); } ``` ## Installation ## Props ### `Callout` ### `ActionableCallout` ### `DismissibleCallout` void)", "default": undefined } }} /> ## Examples ### Content Layout #### Text Only ```tsx import { VStack } from "@seed-design/react"; import { ActionableCallout, Callout, DismissibleCallout } from "seed-design/ui/callout"; export default function CalloutTextOnly() { return ( ); } ``` #### With Icon `icon` prop은 `Callout`에서만 제공돼요. ```tsx import { IconCalendarFill } from "@karrotmarket/react-monochrome-icon"; import { Callout } from "seed-design/ui/callout"; export default function CalloutWithIcon() { return ( } description="기능에 대한 안내 또는 유익한 내용을 전달해요. 콜아웃은 꼭 필요한 경우에만 절제하여 사용해요." /> ); } ``` #### With Title Text ```tsx import { VStack } from "@seed-design/react"; import { ActionableCallout, Callout, DismissibleCallout } from "seed-design/ui/callout"; export default function CalloutWithTitleText() { return ( ); } ``` #### With Link Label `linkProps` prop은 `Callout`과 `DismissibleCallout`에서만 제공돼요. ```tsx import { VStack } from "@seed-design/react"; import { Callout, DismissibleCallout } from "seed-design/ui/callout"; export default function CalloutWithLinkLabel() { return ( ); } ``` #### With All ```tsx import { IconCalendarFill } from "@karrotmarket/react-monochrome-icon"; import { Callout } from "seed-design/ui/callout"; export default function CalloutWithAll() { return ( } description="기능에 대한 안내 또는 유익한 내용을 전달해요. 콜아웃은 꼭 필요한 경우에만 절제하여 사용해요." linkProps={{ children: "시도해 보기" }} /> ); } ``` ### Customizable Parts #### Rendering Link Label as Child ```tsx import { VStack } from "@seed-design/react"; import { Callout, DismissibleCallout } from "seed-design/ui/callout"; export default function CalloutLinkLabelAsChild() { return ( 시도해 보기 ), }} /> 시도해 보기 ), }} /> ); } ``` ### Tones #### Neutral (Default) ```tsx import { VStack } from "@seed-design/react"; import { ActionableCallout, Callout, DismissibleCallout } from "seed-design/ui/callout"; export default function CalloutNeutral() { return ( ); } ``` #### Informative ```tsx import { VStack } from "@seed-design/react"; import { ActionableCallout, Callout, DismissibleCallout } from "seed-design/ui/callout"; export default function CalloutInformative() { return ( ); } ``` #### Warning ```tsx import { VStack } from "@seed-design/react"; import { ActionableCallout, Callout, DismissibleCallout } from "seed-design/ui/callout"; export default function CalloutWarning() { return ( ); } ``` #### Critical ```tsx import { VStack } from "@seed-design/react"; import { ActionableCallout, Callout, DismissibleCallout } from "seed-design/ui/callout"; export default function CalloutCritical() { return ( ); } ``` #### Magic ```tsx import { VStack } from "@seed-design/react"; import { ActionableCallout, Callout, DismissibleCallout } from "seed-design/ui/callout"; export default function CalloutMagic() { return ( ); } ``` file: ./content/react/components/checkbox.mdx # Checkbox 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { Checkbox } from "seed-design/ui/checkbox"; export default function CheckboxPreview() { return ; } ``` ## Installation ## Props ", "default": undefined }, rootRef: { "type": "Ref", "default": undefined }, label: { "type": "ReactNode", "default": undefined }, weight: { "type": "\"default\" | \"stronger\"", "default": "default" }, variant: { "type": "\"square\" | \"ghost\"", "default": "square" }, size: { "type": "\"large\" | \"medium\"", "default": "medium" }, disabled: { "type": "boolean", "default": undefined }, invalid: { "type": "boolean", "default": undefined }, required: { "type": "boolean", "default": undefined }, checked: { "type": "boolean", "default": undefined }, defaultChecked: { "type": "boolean", "default": undefined }, onCheckedChange: { "type": "((checked: boolean) => void)", "default": undefined }, indeterminate: { "type": "boolean", "default": undefined }, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

} }} /> ## Examples ### Size ```tsx import { Checkbox } from "seed-design/ui/checkbox"; export default function CheckboxSize() { return (
); } ```
### Variant ```tsx import { Checkbox } from "seed-design/ui/checkbox"; export default function CheckboxVariant() { return (
); } ```
### Indeterminate ```tsx import { Checkbox } from "seed-design/ui/checkbox"; export default function CheckboxIndeterminate() { return ; } ``` ### Weight=stronger ```tsx import { Checkbox } from "seed-design/ui/checkbox"; export default function CheckboxStronger() { return ; } ``` ### Long Text ```tsx import { Checkbox } from "seed-design/ui/checkbox"; export default function CheckboxLongText() { return (
); } ```
### Disabled ```tsx import { Checkbox } from "seed-design/ui/checkbox"; export default function CheckboxDisabled() { return (
); } ```
### Use Cases #### React Hook Form ```tsx import { HStack, VStack } from "@seed-design/react"; import { useCallback, type FormEvent } from "react"; import { useController, useForm } from "react-hook-form"; import { ActionButton } from "seed-design/ui/action-button"; import { Checkbox } from "seed-design/ui/checkbox"; const POSSIBLE_FRUIT_VALUES = ["apple", "melon", "mango"] as const; type FormValues = Record<(typeof POSSIBLE_FRUIT_VALUES)[number], boolean>; export default function CheckboxReactHookForm() { const { handleSubmit, reset, setValue, control } = useForm({ defaultValues: { apple: false, melon: true, mango: false, }, }); const onValid = useCallback((data: FormValues) => { window.alert(JSON.stringify(data, null, 2)); }, []); const onReset = useCallback( (event: FormEvent) => { event.preventDefault(); reset(); }, [reset], ); return ( {POSSIBLE_FRUIT_VALUES.map((name) => { const { field: { value, ...restProps }, fieldState: { invalid }, } = useController({ name, control }); return ( ); })} 초기화 setValue("mango", true)} > mango 선택 제출 ); } ``` file: ./content/react/components/control-chip.mdx # Control Chip Control Chip은 사용자가 선택, 필터링, 전환과 같은 제어 작업을 수행할 수 있도록 돕는 Pill 형태의 컴포넌트입니다. ```tsx import { ControlChip } from "seed-design/ui/control-chip"; export default function ControlChipPreview() { return 라벨; } ``` ## Installation ## Props ### ControlChip.Button

{"Whether the element should be rendered as a child of a slot."}

}, size: { "type": "\"medium\" | \"small\"", "default": "medium" }, layout: { "type": "\"withText\" | \"iconOnly\"", "default": "withText" } }} /> ### ControlChip.Toggle ", "default": undefined }, rootRef: { "type": "Ref", "default": undefined }, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

}, size: { "type": "\"medium\" | \"small\"", "default": "medium" }, layout: { "type": "\"withText\" | \"iconOnly\"", "default": "withText" }, disabled: { "type": "boolean", "default": undefined }, invalid: { "type": "boolean", "default": undefined }, required: { "type": "boolean", "default": undefined }, checked: { "type": "boolean", "default": undefined }, defaultChecked: { "type": "boolean", "default": undefined }, onCheckedChange: { "type": "((checked: boolean) => void)", "default": undefined }, indeterminate: { "type": "boolean", "default": undefined } }} /> ### ControlChip.RadioRoot void)", "default": undefined }, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

} }} /> ### ControlChip.RadioItem ", "default": undefined }, rootRef: { "type": "Ref", "default": undefined }, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

}, size: { "type": "\"medium\" | \"small\"", "default": "medium" }, layout: { "type": "\"withText\" | \"iconOnly\"", "default": "withText" }, value: { "type": "string", "default": undefined }, disabled: { "type": "boolean", "default": undefined }, invalid: { "type": "boolean", "default": undefined } }} /> ## Examples ### Medium ```tsx import { ControlChip } from "seed-design/ui/control-chip"; export default function ActionChipMedium() { return 라벨; } ``` ### Small ```tsx import { ControlChip } from "seed-design/ui/control-chip"; export default function ActionChipSmall() { return 라벨; } ``` ### 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 ```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 ```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: ./content/react/components/divider.mdx # Divider Divider는 구분선을 표시하는 컴포넌트입니다. ```tsx import { Box, Divider, VStack } from "@seed-design/react"; export default function DividerPreview() { return ( ); } ``` ## Usage ```tsx import { Divider } from "@seed-design/react"; ``` ```tsx ``` ## Props file: ./content/react/components/error-state.mdx # Error State 사용자에게 오류 혹은 조회 결과가 없음을 알리는 컴포넌트입니다. ```tsx import { VStack } from "@seed-design/react"; import { ErrorState } from "seed-design/ui/error-state"; export default function ErrorStatePreview() { return ( ); } ``` ## Installation ## Props ", "default": undefined }, variant: { "type": "\"default\" | \"basement\"", "default": "\"default\"" } }} /> ## Examples ### 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: ./content/react/components/extended-action-sheet.mdx # Extended Action Sheet Extended Action Sheet는 사용자가 특정 작업에 관한 선택지뿐만 아니라 추가적인 선택지를 제공할 때 사용하는 시트 형태의 컴포넌트입니다. ```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 ## Props ### `ExtendedActionSheetRoot`

{"The role of the dialog."}

}, closeOnInteractOutside: { "type": "boolean", "default": "true", description: <>

{"Whether to close the dialog when the outside is clicked"}

}, closeOnEscape: { "type": "boolean", "default": "true", description: <>

{"Whether to close the dialog when the escape key is pressed"}

}, lazyMount: { "type": "boolean", "default": "false", description: <>

{"Whether to enable lazy mounting"}

}, unmountOnExit: { "type": "boolean", "default": "false", description: <>

{"Whether to unmount on exit."}

}, open: { "type": "boolean", "default": undefined }, defaultOpen: { "type": "boolean", "default": undefined }, onOpenChange: { "type": "((open: boolean) => void)", "default": undefined } }} /> ### `ExtendedActionSheetContent`

{"Whether the element should be rendered as a child of a slot."}

} }} /> ### `ExtendedActionSheetItem`

{"Whether the element should be rendered as a child of a slot."}

}, tone: { "type": "\"neutral\" | \"critical\"", "default": "neutral" } }} /> file: ./content/react/components/extended-fab.mdx # Extended FAB 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { IconBellFill } from "@karrotmarket/react-monochrome-icon"; import { ExtendedFab, PrefixIcon } from "@seed-design/react"; export default function ExtendedFabPreview() { return ( } /> 알림 설정 ); } ``` ## Usage ```tsx import { ExtendedFab, PrefixIcon } from "@seed-design/react"; ``` ```tsx } /> 라벨 ``` ## Props

{"Whether the element should be rendered as a child of a slot."}

} }} /> ## Examples ### Medium ```tsx import { IconBellFill } from "@karrotmarket/react-monochrome-icon"; import { ExtendedFab, PrefixIcon } from "@seed-design/react"; export default function ExtendedFabMedium() { return ( } /> 알림 설정 ); } ``` ### Small ```tsx import { IconBellFill } from "@karrotmarket/react-monochrome-icon"; import { ExtendedFab, PrefixIcon } from "@seed-design/react"; export default function ExtendedFabSmall() { return ( } /> 알림 설정 ); } ``` ### Neutral Solid ```tsx import { IconBellFill } from "@karrotmarket/react-monochrome-icon"; import { ExtendedFab, PrefixIcon } from "@seed-design/react"; export default function ExtendedFabNeutralSolid() { return ( } /> 알림 설정 ); } ``` ### Layer Floating ```tsx import { IconBellFill } from "@karrotmarket/react-monochrome-icon"; import { ExtendedFab, PrefixIcon } from "@seed-design/react"; export default function ExtendedFabLayerFloating() { return ( } /> 알림 설정 ); } ``` file: ./content/react/components/fab.mdx # FAB 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import IconPlusLine from "@karrotmarket/react-monochrome-icon/IconPlusLine"; import { Fab, Icon } from "@seed-design/react"; export default function FabPreview() { return ( } /> ); } ``` ## Usage ```tsx import { Fab, Icon } from "@seed-design/react"; import { IconPlusLine } from "@karrotmarket/react-monochrome-icon"; ``` ```tsx } /> ``` ## Props

{"Whether the element should be rendered as a child of a slot."}

} }} /> file: ./content/react/components/help-bubble.mdx # Help Bubble Help Bubble은 사용자에게 컴포넌트의 상태나 특정 기능에 대한 추가 정보를 제공하는 부가적인 도움말 컴포넌트입니다. ```tsx import { ActionButton } from "seed-design/ui/action-button"; import { HelpBubbleTrigger } from "seed-design/ui/help-bubble"; export default function HelpBubblePreview() { return ( 열기 ); } ``` ## Installation ## Props

{"Whether the floating element is initially open"}

}, open: { "type": "boolean", "default": undefined, description: <>

{"Whether the floating element is open"}

}, onOpenChange: { "type": "((open: boolean) => void)", "default": undefined, description: <>

{"Callback when the floating element is opened or closed"}

}, strategy: { "type": "\"absolute\" | \"fixed\"", "default": "\"absolute\"", description: <>

{"The strategy to use for positioning"}

}, placement: { "type": "Placement", "default": "\"bottom\"", description: <>

{"The initial placement of the floating element"}

}, gutter: { "type": "number", "default": undefined, description: <>

{"The gutter between the floating element and the reference element"}

}, flip: { "type": "boolean | Placement[]", "default": "true", description: <>

{"Whether to flip the placement"}

}, slide: { "type": "boolean", "default": "true", description: <>

{"Whether the popover should slide when it overflows."}

}, overflowPadding: { "type": "number", "default": "8", description: <>

{"The virtual padding around the viewport edges to check for overflow"}

}, arrowPadding: { "type": "number", "default": "4", description: <>

{"The minimum padding between the arrow and the floating element's corner."}

} }} /> ## Examples ### Anchor ```tsx import { Avatar } from "seed-design/ui/avatar"; import { HelpBubbleAnchor } from "seed-design/ui/help-bubble"; export default function HelpBubbleAnchorExample() { return ( ); } ``` ### Placement ```tsx import { ActionButton } from "seed-design/ui/action-button"; import { HelpBubbleTrigger } from "seed-design/ui/help-bubble"; export default function HelpBubblePreview() { return ( 열기 ); } ``` ### Flip ```tsx import { ActionButton } from "seed-design/ui/action-button"; import { HelpBubbleTrigger } from "seed-design/ui/help-bubble"; export default function HelpBubbleFlip() { return ( 열기 ); } ``` ### Close Button ```tsx import { ActionButton } from "seed-design/ui/action-button"; import { HelpBubbleTrigger } from "seed-design/ui/help-bubble"; export default function HelpBubbleCloseButton() { return ( 열기 ); } ``` ### Title Only ```tsx import { ActionButton } from "seed-design/ui/action-button"; import { HelpBubbleTrigger } from "seed-design/ui/help-bubble"; export default function HelpBubbleTitleOnly() { return ( 열기 ); } ``` file: ./content/react/components/identity-placeholder.mdx # Identity Placeholder 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { IdentityPlaceholder } from "seed-design/ui/identity-placeholder"; export default function IdentityPlaceholderPreview() { return ; } ``` ## Installation ## Props

{"Whether the element should be rendered as a child of a slot."}

} }} /> file: ./content/react/components/inline-banner.mdx # Inline Banner 사용자가 꼭 알아야 하는 경고 메시지나 현재 상태를 전달하는 컴포넌트에요. ```tsx import { VStack } from "@seed-design/react"; import { ActionableInlineBanner, DismissibleInlineBanner, InlineBanner, } from "seed-design/ui/inline-banner"; export default function InlineBannerPreview() { return ( ); } ``` ## Installation ## Props ### `InlineBanner` ### `ActionableInlineBanner` ### `DismissibleInlineBanner` void)", "default": undefined } }} /> ## Examples ### Content Layout #### With Link Label `linkProps` prop은 `InlineBanner`에서만 제공돼요. ```tsx import { InlineBanner } from "seed-design/ui/inline-banner"; export default function InlineBannerWithLinkLabel() { return ( ); } ``` #### 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 ```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 ```tsx import { VStack } from "@seed-design/react"; import { ActionableInlineBanner, DismissibleInlineBanner, InlineBanner, } from "seed-design/ui/inline-banner"; export default function InlineBannerWithTitleText() { return ( ); } ``` #### 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 #### Rendering `LinkInlineBanner`’s Link Label as Child ```tsx import { InlineBanner } from "seed-design/ui/inline-banner"; export default function InlineBannerLinkLabelAsChild() { return ( 자세히 보기 ), }} /> ); } ``` ### Variants #### 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 ```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 ```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 ```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 ```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 ```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 `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="사업자 정보를 등록해주세요." /> ); } ``` ```tsx import * as React from "react"; import { ActionButton } from "seed-design/ui/action-button"; import { InlineBanner, type InlineBannerProps } from "seed-design/ui/inline-banner"; import AppScreen from "@/components/stackflow/ActivityLayout"; import type { ActivityComponentType } from "@stackflow/react/future"; declare module "@stackflow/config" { interface Register { "inline-banner": unknown; } } const InlineBannerActivity: ActivityComponentType<"inline-banner"> = () => { const [variant, setVariant] = React.useState>( "criticalSolid", ); return (
setVariant((prev) => (prev === "criticalSolid" ? "neutralWeak" : "criticalSolid")) } > Toggle tone

Lorem ipsum dolor sit, amet consectetur adipisicing elit. At a eaque fugiat sint sapiente. Id, hic ex, blanditiis totam animi amet delectus temporibus quae fugiat magnam, quos eaque dolorum a? Lorem ipsum dolor, sit amet consectetur adipisicing elit. Possimus labore unde minus temporibus beatae commodi et nesciunt iure in dignissimos suscipit, alias ab voluptatem facilis tempora numquam. Veritatis, dolorum suscipit! Lorem ipsum dolor sit, amet consectetur adipisicing elit. Explicabo fugiat molestias iusto, ipsum distinctio officia ad id ratione esse ducimus architecto deleniti illum reiciendis rerum, at blanditiis molestiae. Cupiditate, nobis? Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab, magni. Aliquid inventore quaerat nemo architecto harum earum quas porro repudiandae explicabo repellat repellendus magni, corporis omnis laborum, velit dicta blanditiis. Lorem ipsum dolor sit, amet consectetur adipisicing elit. Debitis, eveniet quas. Accusamus facere veritatis expedita delectus, asperiores numquam placeat necessitatibus assumenda, nesciunt in dolorem sit provident repellendus, voluptatem earum! Consequatur. Lorem ipsum dolor, sit amet consectetur adipisicing elit. Aut earum asperiores aliquam magnam est delectus veritatis numquam sint porro tenetur dolores nobis, deleniti voluptas quaerat, quia voluptatum soluta autem perspiciatis? Lorem ipsum dolor sit amet consectetur adipisicing elit. Facilis possimus eaque aliquam maxime? Quidem enim, sed itaque at veritatis nihil officia esse qui provident ipsa adipisci necessitatibus officiis distinctio laborum!

); }; export default InlineBannerActivity; ```
file: ./content/react/components/link-content.mdx # Link Content 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { IconChevronRightLine } from "@karrotmarket/react-monochrome-icon"; import { LinkContent, SuffixIcon } from "@seed-design/react"; export default function LinkContentPreview() { return ( 새 글 } /> ); } ``` ## Usage ```tsx import { LinkContent, SuffixIcon } from "@seed-design/react"; import { IconChevronRightLine } from "@karrotmarket/react-monochrome-icon"; ``` ```tsx Label } /> ``` ## Props

{"Whether the element should be rendered as a child of a slot."}

}, color: { "type": "ScopedColorFg | ScopedColorPalette | (string & {})", "default": undefined } }} /> ## Examples ### Size ```tsx import { IconChevronRightLine } from "@karrotmarket/react-monochrome-icon"; import { LinkContent, SuffixIcon, VStack } from "@seed-design/react"; export default function LinkContentSize() { return ( 추가 } /> 추가 } /> 추가 } /> ); } ``` ### Color ```tsx import { IconChevronRightLine } from "@karrotmarket/react-monochrome-icon"; import { LinkContent, VStack, SuffixIcon } from "@seed-design/react"; export default function LinkContentColor() { return ( 더보기 } /> 더보기 } /> 더보기 } /> 더보기 } /> ); } ``` file: ./content/react/components/manner-temp-badge.mdx # Manner Temp Badge 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { VStack } from "@seed-design/react"; import { MannerTempBadge } from "seed-design/ui/manner-temp-badge"; export default function BadgePreview() { return ( ); } ``` ## Installation ## Props

{"The manner temperature of the badge.\nLevel will be calculated based on this value.\nIf level is provided, this will be ignored."}

}, level: { "type": "\"l1\" | \"l2\" | \"l3\" | \"l4\" | \"l5\" | \"l6\"", "default": "l1" } }} /> file: ./content/react/components/manner-temp.mdx # Manner Temp 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { VStack } from "@seed-design/react"; import { MannerTemp } from "seed-design/ui/manner-temp"; export default function MannerTempPreview() { return ( ); } ``` ## Installation ## Props

{"The manner temperature of the MannerTemp component.\nLevel will be calculated based on this value.\nIf level is provided, this will be ignored."}

}, level: { "type": "\"l1\" | \"l2\" | \"l3\" | \"l4\" | \"l5\" | \"l6\"", "default": "l1" } }} /> file: ./content/react/components/progress-circle.mdx # Progress Circle 작업이 진행 중임을 알리거나 작업 시간을 시각적으로 나타내는 데 사용됩니다. ```tsx import { ProgressCircle } from "seed-design/ui/progress-circle"; export default function ProgressCirclePreview() { return ; } ``` ## Installation ## Props

{"The current value of the progress. if undefined, it will be indeterminate."}

}, minValue: { "type": "number", "default": "0", description: <>

{"The minimum value allowed of the progress."}

}, maxValue: { "type": "number", "default": "100", description: <>

{"The maximum value allowed of the progress."}

}, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

}, tone: { "type": "\"inherit\" | \"neutral\" | \"brand\" | \"staticWhite\"", "default": "neutral" }, size: { "type": "\"inherit\" | \"24\" | \"40\"", "default": "40" } }} /> ## Examples ### Neutral ```tsx import { ProgressCircle } from "seed-design/ui/progress-circle"; export default function ProgressCircleNeutral() { return ; } ``` ### Brand ```tsx import { ProgressCircle } from "seed-design/ui/progress-circle"; export default function ProgressCircleBrand() { return ; } ``` ### Static White ```tsx import { ProgressCircle } from "seed-design/ui/progress-circle"; export default function ProgressCircleStaticWhite() { return (
); } ```
### Size=40 ```tsx import { ProgressCircle } from "seed-design/ui/progress-circle"; export default function ProgressCircle40() { return ; } ``` ### Size=24 ```tsx import { ProgressCircle } from "seed-design/ui/progress-circle"; export default function ProgressCircle24() { return ; } ``` ### Determinate ```tsx import { ProgressCircle } from "seed-design/ui/progress-circle"; export default function ProgressCircleDeterminate() { return ; } ``` ### Indeterminate ```tsx import { ProgressCircle } from "seed-design/ui/progress-circle"; export default function ProgressCirclePreview() { // if you want to show an indeterminate progress circle, you can pass `undefined` or omit the `value` prop return ; } ``` file: ./content/react/components/pull-to-refresh.mdx # Pull To Refresh 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { AppBar, AppScreen } from "@seed-design/stackflow"; import { ActivityComponentType } from "@stackflow/react/future"; import { VStack } from "@seed-design/react"; import { PullToRefreshContent, PullToRefreshIndicator, PullToRefreshRoot, } from "seed-design/ui/pull-to-refresh"; declare module "@stackflow/config" { interface Register { "pull-to-refresh-preview": unknown; } } const PullToRefreshPreview: ActivityComponentType<"pull-to-refresh-preview"> = () => { // AppScreen is imported from @seed-design/stackflow instead of snippet for demo purpose. // AppScreen snippet is integrating PullToRefresh, so it's not necessary to use it here. return ( Pull To Refresh {}} onPtrRefresh={async () => { await new Promise((resolve) => setTimeout(resolve, 1000)); }} > Lorem ipsum dolor sit amet consectetur adipisicing elit. Numquam autem deserunt reprehenderit ducimus sunt. Quod laudantium excepturi tempora fuga repellendus accusantium nam maiores? Quas debitis, neque ullam eligendi minus sit? ); }; export default PullToRefreshPreview; ``` ## Installation ## Props ### PullToRefreshRoot

{"The threshold value to trigger the refresh. (px)"}

}, displacementMultiplier: { "type": "number", "default": "0.5", description: <>

{"The multiplier to calculate displacement from the touch movement."}

}, onPtrPullStart: { "type": "((ctx: PullToRefreshContext) => void)", "default": undefined, description: <>

{"Callback when the pull-to-refresh has started to pull."}

}, onPtrPullMove: { "type": "((ctx: PullToRefreshContext) => void)", "default": undefined, description: <>

{"Callback when the pull-to-refresh is moving during the pull."}

}, onPtrPullEnd: { "type": "((ctx: PullToRefreshContext) => void)", "default": undefined, description: <>

{"Callback when the pull-to-refresh is released.\nIt does not matter if it is ready or not. If you want to handle the refresh, use "}{"onPtrRefresh"}{"."}

}, onPtrReady: { "type": "(() => void)", "default": undefined, description: <>

{"Callback when the pull-to-refresh is pulled over the threshold."}

}, onPtrRefresh: { "type": "(() => Promise)", "default": undefined, description: <>

{"Callback when the pull-to-refresh is released after ready."}

}, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

} }} /> ### PullToRefreshIndicator ### PullToRefreshContent

{"Whether the element should be rendered as a child of a slot."}

} }} /> ## Examples ### PTR in Tabs ```tsx import { VStack } from "@seed-design/react"; import { ActivityComponentType } 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 { TabsContent, TabsList, TabsRoot, TabsTrigger } from "seed-design/ui/tabs"; declare module "@stackflow/config" { interface Register { "pull-to-refresh-tabs": unknown; } } const PullToRefreshTabs: ActivityComponentType<"pull-to-refresh-tabs"> = () => { return ( Pull To Refresh Tab 1 Tab 2 {}} onPtrRefresh={async () => { await new Promise((resolve) => setTimeout(resolve, 1000)); }} > Lorem ipsum dolor sit amet consectetur adipisicing elit. Numquam autem deserunt reprehenderit ducimus sunt. Quod laudantium excepturi tempora fuga repellendus accusantium nam maiores? Quas debitis, neque ullam eligendi minus sit? PTR is not available in this tab. ); }; export default PullToRefreshTabs; ``` file: ./content/react/components/reaction-button.mdx # Reaction Button 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { IconFaceSmileCircleFill } from "@karrotmarket/react-monochrome-icon"; import { Count, PrefixIcon } from "@seed-design/react"; import { ReactionButton } from "seed-design/ui/reaction-button"; export default function ReactionButtonPreview() { return ( } /> 도움돼요 1 ); } ``` ## Installation ## Props

{"버튼에 등록된 비동기 작업이 진행 중임을 사용자에게 알립니다."}

}, disabled: { "type": "boolean", "default": "false", description: <>

{"버튼의 비활성화 여부를 나타냅니다."}

}, pressed: { "type": "boolean", "default": undefined }, defaultPressed: { "type": "boolean", "default": undefined }, onPressedChange: { "type": "((pressed: boolean) => void)", "default": undefined }, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

} }} /> ## Examples ### Small ```tsx import { IconFaceSmileCircleFill } from "@karrotmarket/react-monochrome-icon"; import { Count, PrefixIcon } from "@seed-design/react"; import { ReactionButton } from "seed-design/ui/reaction-button"; export default function ReactionButtonSmall() { return ( } /> 도움돼요 1 ); } ``` ### Xsmall ```tsx import { IconFaceSmileCircleFill } from "@karrotmarket/react-monochrome-icon"; import { Count, PrefixIcon } from "@seed-design/react"; import { ReactionButton } from "seed-design/ui/reaction-button"; export default function ReactionButtonXsmall() { return ( } /> 도움돼요 1 ); } ``` ### Disabled ```tsx import { IconFaceSmileCircleFill } from "@karrotmarket/react-monochrome-icon"; import { PrefixIcon } from "@seed-design/react"; import { ReactionButton } from "seed-design/ui/reaction-button"; export default function ReactionButtonDisabled() { return ( } /> 비활성 ); } ``` ### Loading ```tsx import { IconFaceSmileCircleFill } from "@karrotmarket/react-monochrome-icon"; import { PrefixIcon } from "@seed-design/react"; import { useState } from "react"; import { ReactionButton } from "seed-design/ui/reaction-button"; export default function ReactionButtonLoading() { const [pressed, setPressed] = useState(false); const [loading, setLoading] = useState(false); function handleToggle() { setLoading(true); setTimeout(() => { setLoading(false); setPressed((prev) => !prev); }, 2000); } // 이벤트 핸들링이 필요할 수 있으므로 loading은 disabled를 포함하지 않습니다. 이벤트 발생을 원하지 않는 경우, disabled 속성을 추가해주세요. return ( } /> 시간이 걸리는 토글 ); } ``` file: ./content/react/components/segmented-control.mdx # Segmented Control 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { SegmentedControl, SegmentedControlItem } from "seed-design/ui/segmented-control"; export default function SegmentedControlPreview() { return ( Hot New ); } ``` ## Installation ## Props ### `SegmentedControl` `value`와 `defaultValue` 중 적어도 하나를 제공해야 해요. void)", "default": undefined }, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

} }} /> ### `SegmentedControlItem` ", "default": undefined }, rootRef: { "type": "Ref", "default": undefined }, children: { "type": "string", "default": undefined, description: <>

{"The label of the item.\nType is restricted to string for consistent width between font-weight changes.\nIf you need to render a React element, use each element separately."}

}, value: { "type": "string", "default": undefined }, disabled: { "type": "boolean", "default": undefined }, invalid: { "type": "boolean", "default": undefined }, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

} }} /> ## Examples ### Disabled ```tsx import { SegmentedControl, SegmentedControlItem } from "seed-design/ui/segmented-control"; export default function SegmentedControlPreview() { return ( Hot New ); } ``` ### Long Label Pill 형태의 `SegmentedControlItem` 한 개는 86px의 최소 너비를 가져요. 제공한 옵션 중 이 너비를 초과하는 옵션이 있다면, 가장 긴 옵션의 너비에 모든 옵션의 너비가 맞춰져요. ```tsx import { SegmentedControl, SegmentedControlItem } from "seed-design/ui/segmented-control"; export default function SegmentedControlLongLabel() { return ( 가격 높은 순 할인율 높은 순 인기 많은 순 ); } ``` ### Fixed Width `SegmentedControl`의 `style` prop에 `width`를 제공해서 직접 너비를 설정할 수 있어요. 직접 설정한 너비 안에서 모든 레이블을 overflow 없이 표시할 수 없는 경우, 직접 지정한 너비 대신 overflow 없이 표시할 수 있는 최소 너비로 자동 조정돼요. ```tsx import { SegmentedControl, SegmentedControlItem } from "seed-design/ui/segmented-control"; export default function SegmentedControlFixedWidth() { return ( New Hot ); } ``` ### Long Label & Fixed Width ```tsx import { SegmentedControl, SegmentedControlItem } from "seed-design/ui/segmented-control"; export default function SegmentedControlLongLabelFixedWidth() { return ( 가격 높은 순 할인율 높은 순 인기 많은 순 ); } ``` file: ./content/react/components/skeleton.mdx # Skeleton 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { Skeleton, VStack } from "@seed-design/react"; export default function SkeletonPreview() { return ( ); } ``` ## Usage ```tsx import { Skeleton } from "@seed-design/react"; ``` ```tsx ``` ## Props

{"Whether the element should be rendered as a child of a slot."}

}, height: { "type": "\"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | (string & {})", "default": undefined }, width: { "type": "\"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | (string & {})", "default": undefined } }} /> ## Examples ### Radius ```tsx import { Flex, Skeleton } from "@seed-design/react"; export default function SkeletonRadius() { return ( ); } ``` file: ./content/react/components/snackbar.mdx # Snackbar Snackbar는 사용자 액션의 결과나 프로세스의 결과를 알려주는 일시적인 알림 요소입니다. 화면 하단에 표시되며 자동으로 사라집니다. ```tsx import { ActionButton } from "seed-design/ui/action-button"; import { Snackbar, SnackbarProvider, useSnackbarAdapter } from "seed-design/ui/snackbar"; function Component() { const adapter = useSnackbarAdapter(); return ( adapter.create({ timeout: 5000, onClose: () => {}, render: () => {}} />, }) } > 실행 ); } export default function SnackbarPreview() { return ( ); } ``` ## Installation ## Props ### Snackbar

{"스낵바에 표시할 메시지"}

}, actionLabel: { "type": "string", "default": undefined, description: <>

{"스낵바에 표시할 액션 버튼의 라벨"}

}, onAction: { "type": "(() => void)", "default": undefined, description: <>

{"액션 버튼 클릭 시 호출되는 콜백"}

}, shouldCloseOnAction: { "type": "boolean", "default": "true", description: <>

{"액션 버튼 클릭 시 스낵바를 닫을지 여부"}

}, variant: { "type": "\"default\" | \"positive\" | \"critical\"", "default": "default" }, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

} }} /> ### SnackbarAdapter.create

{"The duration the snackbar will be visible"}

}, removeDelay: { "type": "number", "default": "200", description: <>

{"The duration for the snackbar to kept alive before it is removed.\nUseful for exit transitions."}

}, onClose: { "type": "(() => void)", "default": undefined, description: <>

{"Function called when the snackbar has been closed and removed"}

}, render: { "type": "() => ReactNode", "default": undefined, description: <>

{"The content to render in the snackbar region"}

} }} /> ## Examples ### Positive ```tsx import { ActionButton } from "seed-design/ui/action-button"; import { Snackbar, SnackbarProvider, useSnackbarAdapter } from "seed-design/ui/snackbar"; function Component() { const adapter = useSnackbarAdapter(); return ( adapter.create({ timeout: 5000, onClose: () => {}, render: () => ( {}} /> ), }) } > 실행 ); } export default function SnackbarPositive() { return ( ); } ``` ### Critical ```tsx import { ActionButton } from "seed-design/ui/action-button"; import { Snackbar, SnackbarProvider, useSnackbarAdapter } from "seed-design/ui/snackbar"; function Component() { const adapter = useSnackbarAdapter(); return ( adapter.create({ timeout: 50000000, onClose: () => {}, render: () => ( {}} /> ), }) } > 실행 ); } export default function SnackbarNegative() { return ( ); } ``` ### Avoid Overlap `` 컴포넌트를 사용하여 스낵바가 겹치지 않아야 하는 영역을 지정할 수 있습니다. ``의 자식 컴포넌트는 forwardRef(\~React 18) 혹은 ref prop(React 19\~)으로 ref를 전달받아야 합니다. offset은 다음 상황에서 갱신됩니다. * SnackbarAvoidOverlap의 자식 컴포넌트가 mount될 때 * SnackbarAvoidOverlap의 자식 컴포넌트가 unmount될 때 * SnackbarAvoidOverlap의 자식 컴포넌트의 높이가 변경될 때 * SnackbarRegion의 높이가 변경될 때 ```tsx import { Flex, VStack } from "@seed-design/react"; import { ActionButton } from "seed-design/ui/action-button"; import { Snackbar, SnackbarAvoidOverlap, SnackbarProvider, useSnackbarAdapter, } from "seed-design/ui/snackbar"; function Component() { const adapter = useSnackbarAdapter(); return ( adapter.create({ timeout: 5000, onClose: () => {}, render: () => {}} />, }) } > 실행 Snackbar가 이 영역과 겹치지 않게 조정됩니다. 스크롤은 무시합니다. ); } export default function SnackbarPreview() { return ( ); } ``` file: ./content/react/components/switch.mdx # Switch 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { useState } from "react"; import { Switch } from "seed-design/ui/switch"; export default function SwitchPreview() { const [isChecked, setIsChecked] = useState(false); return ; } ``` ## Installation ## Props ", "default": undefined }, rootRef: { "type": "Ref", "default": undefined }, label: { "type": "ReactNode", "default": undefined, description: <>

{"label is supported in small size only currently."}

}, size: { "type": "\"medium\" | \"small\"", "default": "medium" }, disabled: { "type": "boolean", "default": undefined }, invalid: { "type": "boolean", "default": undefined }, required: { "type": "boolean", "default": undefined }, checked: { "type": "boolean", "default": undefined }, defaultChecked: { "type": "boolean", "default": undefined }, onCheckedChange: { "type": "((checked: boolean) => void)", "default": undefined }, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

} }} /> ## Examples ### Medium ```tsx import { useState } from "react"; import { Switch } from "seed-design/ui/switch"; export default function SwitchMedium() { const [isChecked, setIsChecked] = useState(false); return ; } ``` ### Small ```tsx import { useState } from "react"; import { Switch } from "seed-design/ui/switch"; export default function SwitchSmall() { const [isChecked, setIsChecked] = useState(false); return ; } ``` ### Disabled ```tsx import { Switch } from "seed-design/ui/switch"; export default function SwitchDisabled() { return (
); } ```
file: ./content/react/components/toggle-button.mdx # Toggle Button 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { useState } from "react"; import { ToggleButton } from "seed-design/ui/toggle-button"; export default function ToggleButtonPreview() { const [pressed, setPressed] = useState(false); return ( {pressed ? "선택됨" : "미선택"} ); } ``` ## Installation ## Props

{"버튼에 등록된 비동기 작업이 진행 중임을 사용자에게 알립니다."}

}, disabled: { "type": "boolean", "default": "false", description: <>

{"버튼의 비활성화 여부를 나타냅니다."}

}, pressed: { "type": "boolean", "default": undefined }, defaultPressed: { "type": "boolean", "default": undefined }, onPressedChange: { "type": "((pressed: boolean) => void)", "default": undefined }, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

} }} /> ## Examples ### Brand Solid ```tsx import { useState } from "react"; import { ToggleButton } from "seed-design/ui/toggle-button"; export default function ToggleButtonBrandSolid() { const [pressed, setPressed] = useState(false); return ( {pressed ? "선택됨" : "미선택"} ); } ``` ### Neutral Weak ```tsx import { useState } from "react"; import { ToggleButton } from "seed-design/ui/toggle-button"; export default function ToggleButtonBrandSolid() { const [pressed, setPressed] = useState(false); return ( {pressed ? "선택됨" : "미선택"} ); } ``` ### Small ```tsx import { useState } from "react"; import { ToggleButton } from "seed-design/ui/toggle-button"; export default function ToggleButtonSmall() { const [pressed, setPressed] = useState(false); return ( {pressed ? "선택됨" : "미선택"} ); } ``` ### Xsmall ```tsx import { useState } from "react"; import { ToggleButton } from "seed-design/ui/toggle-button"; export default function ToggleButtonXsmall() { const [pressed, setPressed] = useState(false); return ( {pressed ? "선택됨" : "미선택"} ); } ``` ### Prefix Icon ```tsx import { IconCheckmarkLine, IconPlusLine } from "@karrotmarket/react-monochrome-icon"; import { PrefixIcon } from "@seed-design/react"; import { useState } from "react"; import { ToggleButton } from "seed-design/ui/toggle-button"; export default function ToggleButtonPrefixIcon() { const [pressed, setPressed] = useState(false); return ( : } /> {pressed ? "선택됨" : "미선택"} ); } ``` ### Disabled ```tsx import { ToggleButton } from "seed-design/ui/toggle-button"; export default function ToggleButtonDisabled() { return 비활성; } ``` ### Loading ```tsx import { useState } from "react"; import { ToggleButton } from "seed-design/ui/toggle-button"; export default function ToggleButtonLoading() { const [pressed, setPressed] = useState(false); const [loading, setLoading] = useState(false); function handleToggle() { setLoading(true); setTimeout(() => { setLoading(false); setPressed((prev) => !prev); }, 2000); } // 이벤트 핸들링이 필요할 수 있으므로 loading은 disabled를 포함하지 않습니다. 이벤트 발생을 원하지 않는 경우, disabled 속성을 추가해주세요. return ( 시간이 걸리는 토글 ); } ``` file: ./content/react/get-started/cli.mdx # CLI `@seed-design/cli` 패키지를 사용하여 seed-design을 더 쉽게 사용할 수 있어요. ## init `seed-design.json` 파일을 생성하기 위한 명령어에요. ### init 명령어 입력하기 ```bash npx @seed-design/cli@latest init ``` ```bash pnpm dlx @seed-design/cli@latest init ``` ```bash yarn dlx @seed-design/cli@latest init ``` ```bash bun x @seed-design/cli@latest init ``` ### seed-design 설정 ```sh ◇ TypeScript를 사용중이신가요? │ Yes │ ◇ React Server Components를 사용중이신가요? │ No │ ◇ seed-design 폴더 경로를 입력해주세요. (기본값은 프로젝트 루트에 생성됩니다.) │ ./seed-design ``` 아래 파일을 프로젝트 루트에 생성해주세요. ```json title="seed-design.json" { "rsc": false, "tsx": true, "path": "./seed-design" } ``` ### 옵션들 ```sh copy Usage: $ seed-design init Options: -c, --cwd 작업 디렉토리. 기본값은 현재 디렉토리. -y, --yes 모든 질문에 대해 기본값으로 답변합니다. -h, --help Display this message ``` ## add 컴포넌트를 추가하기 위한 명령어에요. ```bash npx @seed-design/cli@latest add [...components] ``` ```bash pnpm dlx @seed-design/cli@latest add [...components] ``` ```bash yarn dlx @seed-design/cli@latest add [...components] ``` ```bash bun x @seed-design/cli@latest add [...components] ``` 컴포넌트를 입력하지 않고 명령어를 입력하게 되면 받을 수 있는 모든 컴포넌트를 볼 수 있어요. ```bash npx @seed-design/cli@latest add ``` ```bash pnpm dlx @seed-design/cli@latest add ``` ```bash yarn dlx @seed-design/cli@latest add ``` ```bash bun x @seed-design/cli@latest add ``` ```sh copy ◆ Select all components to add │ ◻ action-button │ ◻ alert-dialog │ ◻ tabs │ ◻ callout │ ◻ switch │ ◻ checkbox │ ◻ text-field │ ◻ ... └ ``` 혹은 여러 컴포넌트를 입력해서 추가할 수도 있어요. ```bash npx @seed-design/cli@latest add action-button alert-dialog ``` ```bash pnpm dlx @seed-design/cli@latest add action-button alert-dialog ``` ```bash yarn dlx @seed-design/cli@latest add action-button alert-dialog ``` ```bash bun x @seed-design/cli@latest add action-button alert-dialog ``` ### 옵션들 ```sh copy Usage: $ seed-design add [...components] Options: -a, --all Add all components (default: false) -c, --cwd the working directory. defaults to the current directory. -h, --help Display this message Examples: seed-design add action-button seed-design add alert-dialog ``` file: ./content/react/get-started/codemod.mdx # Codemod Seed Design V2에서 V3로 마이그레이션하기 위한 코드 변환 도구 {/* Auto-generated from `scripts/generate-codemod-docs.ts` */} `@seed-design/codemod`는 Seed Design V2에서 V3로 마이그레이션하기 위한 코드 변환 도구예요. ## 사용 방법 ```bash npx @seed-design/codemod <옵션> ``` ```bash pnpm dlx @seed-design/codemod <옵션> ``` ```bash yarn dlx @seed-design/codemod <옵션> ``` ```bash bun x @seed-design/codemod <옵션> ``` 사용 가능한 transform 목록을 확인하려면 다음 명령어를 실행해요. ```bash npx @seed-design/codemod --list ``` ```bash pnpm dlx @seed-design/codemod --list ``` ```bash yarn dlx @seed-design/codemod --list ``` ```bash bun x @seed-design/codemod --list ``` ## 옵션 * `--list` * 사용 가능한 transform 목록을 보여줘요. * `--log` * 로그를 파일로 저장해요. * `./`에 `combined.log`와 `warnings.log` 파일이 생성돼요. * `--parser` * jscodeshift가 사용할 파서를 지정해요 * `babel` | `babylon` | `flow` | `ts` | `tsx` * 기본값: `tsx` * 예시: `--parser=babel` * `--extensions` * 변환할 파일 확장자를 지정해요. * 지정하지 않으면 `<경로>` 안의 `js,jsx,ts,tsx` 파일을 변환해요. (`d.ts`는 제외) * 예시: `--extensions="ts,tsx"` * `--ignore-config` * 변환하지 않을 파일 패턴이 정의된 파일을 지정해요. * 예시: `--ignore-config=".gitignore"` ## 사용 가능한 Transforms ### replace-custom-seed-design-typography ```bash npx @seed-design/codemod replace-custom-seed-design-typography ``` ```bash pnpm dlx @seed-design/codemod replace-custom-seed-design-typography ``` ```bash yarn dlx @seed-design/codemod replace-custom-seed-design-typography ``` ```bash bun x @seed-design/codemod replace-custom-seed-design-typography ``` ```ts title="basic.input.ts" // @ts-nocheck import { style } from "@vanilla-extract/css"; import { vars } from "@seed-design/css"; import { f, reset } from "@/shared/styles"; export const title = style([ typography.h4, { textAlign: "center", color: vars.$scale.color.gray900, margin: 0, }, ]); export const subtitle = style([ f.typography.title2Bold, { marginBottom: "0.375rem", color: vars.$scale.color.gray900, }, ]); export const smallText = style([ typo.caption2Regular, { color: vars.$scale.color.gray700, }, ]); export const largeTitle = style([ typo.bodyL1Regular, { color: vars.$scale.color.gray900, }, ]); ``` ```ts title="basic.output.ts" // @ts-nocheck import { style } from "@vanilla-extract/css"; import { vars } from "@seed-design/css"; import { f, reset } from "@/shared/styles"; export const title = style([ typography.t10Bold, { textAlign: "center", color: vars.$scale.color.gray900, margin: 0, }, ]); export const subtitle = style([ f.typography.t7Bold, { marginBottom: "0.375rem", color: vars.$scale.color.gray900, }, ]); export const smallText = style([ typo.t2Regular, { color: vars.$scale.color.gray700, }, ]); export const largeTitle = style([ typo.articleBody, { color: vars.$scale.color.gray900, }, ]); ``` ### replace-tailwind-typography ```bash npx @seed-design/codemod replace-tailwind-typography ``` ```bash pnpm dlx @seed-design/codemod replace-tailwind-typography ``` ```bash yarn dlx @seed-design/codemod replace-tailwind-typography ``` ```bash bun x @seed-design/codemod replace-tailwind-typography ``` ```tsx title="basic.input.tsx" // @ts-nocheck export function BasicExample() { return (
Primary Background

{formState.content}

Hover Primary Low Background
Focus Primary Low Background
Focus Primary Low Background

{description}

); } ``` ```tsx title="basic.output.tsx" // @ts-nocheck export function BasicExample() { return ( (
Primary Background

{formState.content}

Hover Primary Low Background
Focus Primary Low Background
Focus Primary Low Background

{description}

) ); } ```
### replace-custom-imported-typography-variable Seed Design V2에서 V3로 마이그레이션 시 import된 타이포그래피 변수를 변환합니다. #### 기능 * 타이포그래피 관련 import 문을 찾아 변수명을 변환합니다. * 변수가 사용된 모든 위치(템플릿 리터럴, 객체 속성 등)를 찾아 업데이트합니다. * typography.mjs의 매핑 정보에 따라 V2 타이포그래피 변수를 V3로 변환합니다. * 같은 V3 토큰으로 변환되는 중복 import를 제거합니다 (예: subtitle1Regular, bodyM1Regular가 모두 t5Regular로 변환되면 t5Regular는 한 번만 import). * 별칭(alias)으로 import된 변수명은 유지합니다 (예: `bodyM1Regular as customTypo`에서 `t5Regular as customTypo`로 변환). ```bash npx @seed-design/codemod replace-custom-imported-typography-variable ``` ```bash pnpm dlx @seed-design/codemod replace-custom-imported-typography-variable ``` ```bash yarn dlx @seed-design/codemod replace-custom-imported-typography-variable ``` ```bash bun x @seed-design/codemod replace-custom-imported-typography-variable ``` ```ts title="basic.input.ts" // @ts-nocheck import { subtitle1Regular, subtitle2Regular, h4, title1Bold, title2Bold, bodyL1Regular, bodyL2Regular, caption1Regular, caption2Regular, label5Regular, } from '@src/constants/typography' import { bodyM1Regular as customTypo } from '@karrot/typography' const S_StoreRequestTitle = styled.h1` ${subtitle1Regular}; margin: 0 0 0.25rem; color: ${vars.$scale.color.gray900}; text-align: center; ` const S_StoreRequestText = styled.p` ${subtitle2Regular}; margin: 0; color: ${vars.$scale.color.gray600}; text-align: center; ` // 추가 테스트 케이스 // screenTitle 매핑 테스트 const S_ScreenHeader = styled.h1` ${h4}; margin-bottom: 1rem; ` // 일반 매핑 테스트 const S_Title = styled.h2` ${title1Bold}; color: ${vars.$scale.color.gray900}; ` // 여러 테스트 케이스를 담은 컴포넌트 const Card = styled.div` // title2Bold 매핑 테스트 h3 { ${title2Bold}; margin-bottom: 8px; } // bodyL1Regular 매핑 테스트 p.description { ${bodyL1Regular}; color: ${vars.$scale.color.gray800}; } // 대체 토큰으로 매핑되는 케이스 p.content { ${bodyL2Regular}; margin: 0; } // 캡션 스타일 p.caption { ${caption1Regular}; color: ${vars.$scale.color.gray600}; } // 작은 텍스트 small { ${caption2Regular}; color: ${vars.$scale.color.gray500}; } // 라벨 스타일 label { ${label5Regular}; margin-right: 4px; } ` // 다른 모듈에서 가져온 타이포그래피 처리 (별칭 유지해야 함) const S_CustomContent = styled.div` ${customTypo}; color: ${vars.$scale.color.gray700}; ` // 변수로 사용하는 경우 const titleStyle = title1Bold; const textStyle = subtitle1Regular; ``` ```ts title="basic.output.ts" // @ts-nocheck import { t5Regular, t4Regular, t10Bold, t9Bold, t7Bold, articleBody, t3Regular, t2Regular, t1Regular, } from '@src/constants/typography'; import { t5Regular as customTypo } from '@karrot/typography' const S_StoreRequestTitle = styled.h1` ${t5Regular}; margin: 0 0 0.25rem; color: ${vars.$scale.color.gray900}; text-align: center; ` const S_StoreRequestText = styled.p` ${t4Regular}; margin: 0; color: ${vars.$scale.color.gray600}; text-align: center; ` // 추가 테스트 케이스 // screenTitle 매핑 테스트 const S_ScreenHeader = styled.h1` ${t10Bold}; margin-bottom: 1rem; ` // 일반 매핑 테스트 const S_Title = styled.h2` ${t9Bold}; color: ${vars.$scale.color.gray900}; ` // 여러 테스트 케이스를 담은 컴포넌트 const Card = styled.div` // title2Bold 매핑 테스트 h3 { ${t7Bold}; margin-bottom: 8px; } // bodyL1Regular 매핑 테스트 p.description { ${articleBody}; color: ${vars.$scale.color.gray800}; } // 대체 토큰으로 매핑되는 케이스 p.content { ${t4Regular}; margin: 0; } // 캡션 스타일 p.caption { ${t3Regular}; color: ${vars.$scale.color.gray600}; } // 작은 텍스트 small { ${t2Regular}; color: ${vars.$scale.color.gray500}; } // 라벨 스타일 label { ${t1Regular}; margin-right: 4px; } ` // 다른 모듈에서 가져온 타이포그래피 처리 (별칭 유지해야 함) const S_CustomContent = styled.div` ${customTypo}; color: ${vars.$scale.color.gray700}; ` // 변수로 사용하는 경우 const titleStyle = t9Bold; const textStyle = t5Regular; ``` ### replace-custom-seed-design-vars ```bash npx @seed-design/codemod replace-custom-seed-design-vars ``` ```bash pnpm dlx @seed-design/codemod replace-custom-seed-design-vars ``` ```bash yarn dlx @seed-design/codemod replace-custom-seed-design-vars ``` ```bash bun x @seed-design/codemod replace-custom-seed-design-vars ``` ```ts title="basic.input.ts" // @ts-nocheck import { vars } from '@/shared/style/vars'; export const date = style({ ...vars.typography.caption1Regular, color: vars.color.gray600, }); export const color1 = style({ color: vars.color.yellow500, }); export const color2 = style({ color: vars.color.blue500, }); export const color3 = style({ color: vars.color.red500, }); export const title = style({ ...vars.typography.bodyM1Bold, color: vars.color.primary, }); export const subtitle = style({ ...vars.typography.bodyM2Regular, color: vars.color.secondary, }); // 배경색 케이스 export const cardBackground = style({ backgroundColor: vars.color.paperSheet, padding: '16px', }); // 테두리 케이스 export const divider = style({ borderTop: `1px solid ${vars.color.divider1}`, marginTop: '8px', marginBottom: '8px', }); // 상태 색상 케이스 export const successMessage = style({ ...vars.typography.bodyM1Bold, color: vars.color.success, backgroundColor: vars.color.successLow, padding: '12px', borderRadius: '4px', }); export const warningMessage = style({ ...vars.typography.bodyM1Bold, color: vars.color.warning, backgroundColor: vars.color.warningLow, padding: '12px', borderRadius: '4px', }); export const errorMessage = style({ ...vars.typography.bodyM1Bold, color: vars.color.danger, backgroundColor: vars.color.dangerLow, padding: '12px', borderRadius: '4px', }); // 다양한 타이포그래피 케이스 export const heading = style({ ...vars.typography.h4, color: vars.color.inkText, }); export const body = style({ ...vars.typography.bodyL1Regular, color: vars.color.inkTextLow, }); export const label = style({ ...vars.typography.label3Bold, color: vars.color.grayActive, }); // 알파 색상 케이스 export const overlay = style({ backgroundColor: vars.color.overlayDim, position: 'absolute', top: 0, left: 0, right: 0, bottom: 0, }); // 복합 케이스와 상호작용 상태 export const button = style({ ...vars.typography.label2Bold, backgroundColor: vars.color.primary, color: vars.color.onPrimary, borderRadius: '4px', padding: '8px 16px', border: 'none', cursor: 'pointer', ':hover': { backgroundColor: vars.color.primaryHover, }, ':active': { backgroundColor: vars.color.primaryPressed, }, }); export const secondaryButton = style({ ...vars.typography.label2Bold, backgroundColor: vars.color.secondaryLow, color: vars.color.secondary, borderRadius: '4px', padding: '8px 16px', border: 'none', cursor: 'pointer', ':hover': { backgroundColor: vars.color.grayHover, }, ':active': { backgroundColor: vars.color.grayPressed, }, }); // 중첩 경로 케이스 export const floatingPanel = style({ backgroundColor: vars.color.paperFloating, boxShadow: `0 2px 8px ${vars.color.overlayLow}`, padding: '20px', borderRadius: '8px', }); export const dialogPanel = style({ backgroundColor: vars.color.paperDialog, padding: '24px', boxShadow: `0 4px 16px ${vars.color.overlayDim}`, borderRadius: '12px', }); // 정적 색상 케이스 export const staticColors = style({ color: vars.color.staticBlack, backgroundColor: vars.color.staticWhite, border: `1px solid ${vars.color.staticBlackAlpha200}`, }); // 정적 색상 케이스 (명시적으로 static 프리픽스 테스트) export const staticExplicitColors = style({ color: vars.color.staticBlack, backgroundColor: vars.color.staticWhite, boxShadow: `0 2px 4px ${vars.color.staticBlackAlpha500}`, outline: `1px solid ${vars.color.staticBlackAlpha200}`, }); export const specialBackground = style({ background: `linear-gradient(to bottom, ${vars.color.staticWhiteAlpha50}, ${vars.color.staticWhiteAlpha200})`, backdropFilter: 'blur(8px)', }); // 복합 스타일 및 다중 속성 케이스 export const multiProperty = style({ ...vars.typography.title2Bold, color: vars.color.accent, borderLeft: `4px solid ${vars.color.accent}`, borderRight: `4px solid ${vars.color.accent}`, boxShadow: `inset 0 0 0 1px ${vars.color.divider2}, 0 2px 4px ${vars.color.overlayLow}`, padding: '16px', backgroundColor: vars.color.paperDefault, }); // 믹스인 스타일 케이스 export const mixinStyle = { primary: { background: vars.color.primary, color: vars.color.onPrimary, }, secondary: { background: vars.color.secondary, }, accent: { background: vars.color.accent, color: vars.color.onGrayOverlay50, }, }; // 특수 속성 및 스케일 색상 케이스 export const scaleColors = style({ fill: vars.color.carrot500, stroke: vars.color.gray400, stopColor: vars.color.blue400, floodColor: vars.color.red400, lightingColor: vars.color.green400, }); // 특수 타이포그래피 케이스 export const specialTypographies = { title: vars.typography.title1Bold, subtitle: vars.typography.subtitle1Regular, label: vars.typography.label5Regular, caption: vars.typography.caption2Bold, }; // 다양한 경로를 가진 컬러 토큰 export const colorContexts = style({ // 일반 색상 color: vars.color.primaryLow, // 배경 색상 backgroundColor: vars.color.paperBackground, // 테두리 색상 borderColor: vars.color.divider3, // 호버 색상 ':hover': { backgroundColor: vars.color.primaryLowHover, borderColor: vars.color.primaryLowActive, }, }); // 복잡한 다중 경로와 중첩된 객체 export const nestedStyleObject = { button: { default: { backgroundColor: vars.color.paperAccent, color: vars.color.inkText, border: `1px solid ${vars.color.carrot300}`, }, hover: { backgroundColor: vars.color.carrot100, borderColor: vars.color.carrot400, }, active: { backgroundColor: vars.color.carrot200, color: vars.color.inkTextLow, }, }, panel: { header: { ...vars.typography.subtitle2Bold, color: vars.color.blue600, borderBottom: `1px solid ${vars.color.blue200}`, }, body: { ...vars.typography.bodyM2Regular, color: vars.color.inkTextLow, backgroundColor: vars.color.blue50, }, footer: { backgroundColor: vars.color.blue100, borderTop: `1px solid ${vars.color.blue200}`, }, }, }; // 테두리 속성 매핑 테스트 export const borderMapping = style({ // stroke 토큰으로 매핑될 속성 borderColor: vars.color.divider2, // stroke 토큰이 없어서 fg 토큰으로 대체되는 케이스 borderTopColor: vars.color.primary, borderBottomColor: vars.color.accent, // stroke 또는 fg 토큰으로 대체 boxShadow: `0 0 0 1px ${vars.color.primary}, 0 2px 4px ${vars.color.overlayLow}`, // 복합 속성 border: `1px solid ${vars.color.secondary}`, }); ``` ```ts title="basic.output.ts" // @ts-nocheck import { vars } from '@/shared/style/vars'; export const date = style({ ...vars.typography.t3Regular, color: vars.color.palette.gray700, }); export const color1 = style({ color: vars.color.palette.yellow700, }); export const color2 = style({ color: vars.color.palette.blue600, }); export const color3 = style({ color: vars.color.palette.red700, }); export const title = style({ ...vars.typography.t5Bold, color: vars.color.fg.brand, }); export const subtitle = style({ ...vars.typography.t4Regular, color: vars.color.palette.gray900, }); // 배경색 케이스 export const cardBackground = style({ backgroundColor: vars.color.bg.layerFloating, padding: '16px', }); // 테두리 케이스 export const divider = style({ borderTop: `1px solid ${vars.color.stroke.neutralMuted}`, marginTop: '8px', marginBottom: '8px', }); // 상태 색상 케이스 export const successMessage = style({ ...vars.typography.t5Bold, color: vars.color.fg.positive, backgroundColor: vars.color.bg.positiveWeak, padding: '12px', borderRadius: '4px', }); export const warningMessage = style({ ...vars.typography.t5Bold, color: vars.color.bg.warningSolid, backgroundColor: vars.color.bg.warningWeak, padding: '12px', borderRadius: '4px', }); export const errorMessage = style({ ...vars.typography.t5Bold, color: vars.color.fg.critical, backgroundColor: vars.color.bg.criticalWeak, padding: '12px', borderRadius: '4px', }); // 다양한 타이포그래피 케이스 export const heading = style({ ...vars.typography.t10Bold, color: vars.color.fg.neutral, }); export const body = style({ ...vars.typography.articleBody, color: vars.color.fg.neutralSubtle, }); export const label = style({ ...vars.typography.t4Bold, color: vars.color.fg.neutralMuted, }); // 알파 색상 케이스 export const overlay = style({ backgroundColor: vars.color.bg.overlay, position: 'absolute', top: 0, left: 0, right: 0, bottom: 0, }); // 복합 케이스와 상호작용 상태 export const button = style({ ...vars.typography.t5Bold, backgroundColor: vars.color.bg.brandSolid, color: vars.color.palette.staticWhite, borderRadius: '4px', padding: '8px 16px', border: 'none', cursor: 'pointer', ':hover': { backgroundColor: vars.color.bg.brandSolidPressed, }, ':active': { backgroundColor: vars.color.bg.brandSolidPressed, }, }); export const secondaryButton = style({ ...vars.typography.t5Bold, backgroundColor: vars.color.bg.neutralWeak, color: vars.color.palette.gray900, borderRadius: '4px', padding: '8px 16px', border: 'none', cursor: 'pointer', ':hover': { backgroundColor: vars.color.bg.neutralWeakPressed, }, ':active': { backgroundColor: vars.color.bg.neutralWeakPressed, }, }); // 중첩 경로 케이스 export const floatingPanel = style({ backgroundColor: vars.color.bg.layerFloating, boxShadow: `0 2px 8px ${vars.color.bg.overlayMuted}`, padding: '20px', borderRadius: '8px', }); export const dialogPanel = style({ backgroundColor: vars.color.bg.layerFloating, padding: '24px', boxShadow: `0 4px 16px ${vars.color.bg.overlay}`, borderRadius: '12px', }); // 정적 색상 케이스 export const staticColors = style({ color: vars.color.palette.staticBlack, backgroundColor: vars.color.palette.staticWhite, border: `1px solid ${vars.color.palette.staticBlackAlpha200}`, }); // 정적 색상 케이스 (명시적으로 static 프리픽스 테스트) export const staticExplicitColors = style({ color: vars.color.palette.staticBlack, backgroundColor: vars.color.palette.staticWhite, boxShadow: `0 2px 4px ${vars.color.palette.staticBlackAlpha500}`, outline: `1px solid ${vars.color.palette.staticBlackAlpha200}`, }); export const specialBackground = style({ background: `linear-gradient(to bottom, ${vars.color.palette.staticWhiteAlpha50}, ${vars.color.palette.staticWhiteAlpha200})`, backdropFilter: 'blur(8px)', }); // 복합 스타일 및 다중 속성 케이스 export const multiProperty = style({ ...vars.typography.t7Bold, color: vars.color.fg.informative, borderLeft: `4px solid ${vars.color.fg.informative}`, borderRight: `4px solid ${vars.color.fg.informative}`, boxShadow: `inset 0 0 0 1px ${vars.color.stroke.neutral}, 0 2px 4px ${vars.color.bg.overlayMuted}`, padding: '16px', backgroundColor: vars.color.bg.layerDefault, }); // 믹스인 스타일 케이스 export const mixinStyle = { primary: { background: vars.color.bg.brandSolid, color: vars.color.palette.staticWhite, }, secondary: { background: vars.color.palette.gray900, }, accent: { background: vars.color.bg.informativeSolid, color: vars.color.stroke.onImage, }, }; // 특수 속성 및 스케일 색상 케이스 export const scaleColors = style({ fill: vars.color.palette.carrot600, stroke: vars.color.palette.gray500, stopColor: vars.color.palette.blue400, floodColor: vars.color.palette.red600, lightingColor: vars.color.palette.green500, }); // 특수 타이포그래피 케이스 export const specialTypographies = { title: vars.typography.t9Bold, subtitle: vars.typography.t5Regular, label: vars.typography.t1Regular, caption: vars.typography.t2Bold, }; // 다양한 경로를 가진 컬러 토큰 export const colorContexts = style({ // 일반 색상 color: vars.color.palette.carrot100, // 배경 색상 backgroundColor: vars.color.bg.layerBasement, // 테두리 색상 borderColor: vars.color.palette.gray400, // 호버 색상 ':hover': { backgroundColor: vars.color.palette.carrot200, borderColor: vars.color.palette.carrot100, }, }); // 복잡한 다중 경로와 중첩된 객체 export const nestedStyleObject = { button: { default: { backgroundColor: vars.color.palette.carrot100, color: vars.color.fg.neutral, border: `1px solid ${vars.color.palette.carrot400}`, }, hover: { backgroundColor: vars.color.palette.carrot200, borderColor: vars.color.palette.carrot500, }, active: { backgroundColor: vars.color.palette.carrot300, color: vars.color.fg.neutralSubtle, }, }, panel: { header: { ...vars.typography.t4Bold, color: vars.color.palette.blue600, borderBottom: `1px solid ${vars.color.palette.blue300}`, }, body: { ...vars.typography.t4Regular, color: vars.color.fg.neutralSubtle, backgroundColor: vars.color.palette.blue100, }, footer: { backgroundColor: vars.color.palette.blue200, borderTop: `1px solid ${vars.color.palette.blue300}`, }, }, }; // 테두리 속성 매핑 테스트 export const borderMapping = style({ // stroke 토큰으로 매핑될 속성 borderColor: vars.color.stroke.neutral, // stroke 토큰이 없어서 fg 토큰으로 대체되는 케이스 borderTopColor: vars.color.fg.brand, borderBottomColor: vars.color.fg.informative, // stroke 또는 fg 토큰으로 대체 boxShadow: `0 0 0 1px ${vars.color.bg.brandSolid}, 0 2px 4px ${vars.color.bg.overlayMuted}`, // 복합 속성 border: `1px solid ${vars.color.palette.gray900}`, }); ``` ### replace-stitches-styled-typography ```bash npx @seed-design/codemod replace-stitches-styled-typography ``` ```bash pnpm dlx @seed-design/codemod replace-stitches-styled-typography ``` ```bash yarn dlx @seed-design/codemod replace-stitches-styled-typography ``` ```bash bun x @seed-design/codemod replace-stitches-styled-typography ``` ```tsx title="basic.input.tsx" // @ts-nocheck const ContentText = styled('p', { ...userSelectText, overflow: 'hidden', whiteSpace: 'pre-wrap', wordBreak: 'break-word', color: '$gray900', variants: { size: { medium: { $text: 'bodyM1Regular', }, large: { $text: 'bodyL1Regular', }, xlarge: { $text: "h4", }, }, }, }); ``` ```tsx title="basic.output.tsx" // @ts-nocheck const ContentText = styled('p', { ...userSelectText, overflow: 'hidden', whiteSpace: 'pre-wrap', wordBreak: 'break-word', color: '$gray900', variants: { size: { medium: { $text: "t5Regular", }, large: { $text: "articleBody", }, xlarge: { $text: "t10Bold", }, }, }, }); ``` ### replace-stitches-theme-color ```bash npx @seed-design/codemod replace-stitches-theme-color ``` ```bash pnpm dlx @seed-design/codemod replace-stitches-theme-color ``` ```bash yarn dlx @seed-design/codemod replace-stitches-theme-color ``` ```bash bun x @seed-design/codemod replace-stitches-theme-color ``` ```tsx title="basic.input.tsx" // @ts-nocheck import { theme } from '@src/stitches/stitches.config' const semanticColors = { primary: theme.colors['primary-semantic'].computedValue, onPrimary: theme.colors['onPrimary-semantic'].computedValue, primaryLow: theme.colors['primaryLow-semantic'].computedValue, success: theme.colors['success-semantic'].computedValue, warning: theme.colors['warning-semantic'].computedValue, danger: theme.colors['danger-semantic'].computedValue, paperDefault: theme.colors['paperDefault-semantic'].computedValue, paperContents: theme.colors['paperContents-semantic'].computedValue, paperDialog: theme.colors['paperDialog-semantic'].computedValue, inkText: theme.colors['inkText-semantic'].computedValue, inkTextLow: theme.colors['inkTextLow-semantic'].computedValue, divider1: theme.colors['divider1-semantic'].computedValue, divider2: theme.colors['divider2-semantic'].computedValue, overlayDim: theme.colors['overlayDim-semantic'].computedValue, accent: theme.colors['accent-semantic'].computedValue, } const scaleColors = { gray00: theme.colors.gray00.computedValue, gray100: theme.colors.gray100.computedValue, gray200: theme.colors.gray200.computedValue, gray300: theme.colors.gray300.computedValue, gray400: theme.colors.gray400.computedValue, gray500: theme.colors.gray500.computedValue, gray600: theme.colors.gray600.computedValue, gray700: theme.colors.gray700.computedValue, gray800: theme.colors.gray800.computedValue, gray900: theme.colors.gray900.computedValue, carrot100: theme.colors.carrot100.computedValue, carrot500: theme.colors.carrot500.computedValue, carrot900: theme.colors.carrot900.computedValue, carrotAlpha50: theme.colors.carrotAlpha50.computedValue, carrotAlpha100: theme.colors.carrotAlpha100.computedValue, carrotAlpha200: theme.colors.carrotAlpha200.computedValue, blue300: theme.colors.blue300.computedValue, blue600: theme.colors.blue600.computedValue, red500: theme.colors.red500.computedValue, } const staticColors = { white: theme.colors['white-static'].computedValue, black: theme.colors['black-static'].computedValue, blackAlpha200: theme.colors['blackAlpha200-static'].computedValue, whiteAlpha200: theme.colors['whiteAlpha200-static'].computedValue, gray900: theme.colors['gray900-static'].computedValue, carrot50: theme.colors['carrot50-static'].computedValue, carrot800: theme.colors['carrot800-static'].computedValue, blue50: theme.colors['blue50-static'].computedValue, blue800: theme.colors['blue800-static'].computedValue, red50: theme.colors['red50-static'].computedValue, red800: theme.colors['red800-static'].computedValue, } const Component = () => { return (
안내사항 중요
); }; const Dialog = ({ isOpen, onClose }) => { const styles = { overlay: { backgroundColor: theme.colors['overlayDim-semantic'].computedValue, }, container: { backgroundColor: theme.colors['paperDialog-semantic'].computedValue, borderColor: theme.colors.gray300.computedValue, }, header: { borderBottom: `1px solid ${theme.colors['divider1-semantic'].computedValue}`, }, title: { color: theme.colors.gray900.computedValue, }, content: { color: theme.colors.gray700.computedValue, backgroundColor: theme.colors['paperContents-semantic'].computedValue, }, footer: { borderTop: `1px solid ${theme.colors['divider2-semantic'].computedValue}`, }, closeButton: { color: theme.colors.gray500.computedValue, }, submitButton: { backgroundColor: theme.colors.blue600.computedValue, color: theme.colors['white-static'].computedValue, }, }; return isOpen ? (

다이얼로그 제목

다이얼로그 내용
) : null; }; export { semanticColors, scaleColors, staticColors, Component, Dialog }; ``` ```tsx title="basic.output.tsx" // @ts-nocheck import { theme } from '@src/stitches/stitches.config' const semanticColors = { primary: theme.colors["bg-brand-solid"].computedValue, onPrimary: theme.colors["palette-static-white"].computedValue, primaryLow: theme.colors["palette-carrot-100"].computedValue, success: theme.colors["bg-positive-solid"].computedValue, warning: theme.colors["bg-warning-solid"].computedValue, danger: theme.colors["bg-critical-solid"].computedValue, paperDefault: theme.colors["bg-layer-default"].computedValue, paperContents: theme.colors["bg-layer-fill"].computedValue, paperDialog: theme.colors["bg-layer-floating"].computedValue, inkText: theme.colors["fg-neutral"].computedValue, inkTextLow: theme.colors["fg-neutral-subtle"].computedValue, divider1: theme.colors["stroke-neutral-muted"].computedValue, divider2: theme.colors["stroke-neutral"].computedValue, overlayDim: theme.colors["bg-overlay"].computedValue, accent: theme.colors["bg-informative-solid"].computedValue, } const scaleColors = { gray00: theme.colors["palette-gray-00"].computedValue, gray100: theme.colors["palette-gray-200"].computedValue, gray200: theme.colors["palette-gray-300"].computedValue, gray300: theme.colors["palette-gray-400"].computedValue, gray400: theme.colors["palette-gray-500"].computedValue, gray500: theme.colors["palette-gray-600"].computedValue, gray600: theme.colors["palette-gray-700"].computedValue, gray700: theme.colors["palette-gray-800"].computedValue, gray800: theme.colors["palette-gray-900"].computedValue, gray900: theme.colors["palette-gray-1000"].computedValue, carrot100: theme.colors["palette-carrot-200"].computedValue, carrot500: theme.colors["palette-carrot-600"].computedValue, carrot900: theme.colors["palette-carrot-800"].computedValue, carrotAlpha50: theme.colors["palette-carrot-100"].computedValue, carrotAlpha100: theme.colors["palette-carrot-200"].computedValue, carrotAlpha200: theme.colors["palette-carrot-200"].computedValue, blue300: theme.colors["palette-blue-400"].computedValue, blue600: theme.colors["palette-blue-600"].computedValue, red500: theme.colors["palette-red-700"].computedValue, } const staticColors = { white: theme.colors["palette-static-white"].computedValue, black: theme.colors["palette-static-black"].computedValue, blackAlpha200: theme.colors["palette-static-black-alpha-200"].computedValue, whiteAlpha200: theme.colors["palette-static-white-alpha-200"].computedValue, gray900: theme.colors["palette-static-black"].computedValue, carrot50: theme.colors["palette-carrot-100"].computedValue, carrot800: theme.colors["palette-carrot-700"].computedValue, blue50: theme.colors["palette-blue-100"].computedValue, blue800: theme.colors["palette-blue-700"].computedValue, red50: theme.colors["palette-red-100"].computedValue, red800: theme.colors["palette-red-700"].computedValue, } const Component = () => { return ( (
안내사항 중요
) ); }; const Dialog = ({ isOpen, onClose }) => { const styles = { overlay: { backgroundColor: theme.colors["bg-overlay"].computedValue, }, container: { backgroundColor: theme.colors["bg-layer-floating"].computedValue, borderColor: theme.colors["palette-gray-400"].computedValue, }, header: { borderBottom: `1px solid ${theme.colors["stroke-neutral-muted"].computedValue}`, }, title: { color: theme.colors["palette-gray-1000"].computedValue, }, content: { color: theme.colors["palette-gray-800"].computedValue, backgroundColor: theme.colors["bg-layer-fill"].computedValue, }, footer: { borderTop: `1px solid ${theme.colors["stroke-neutral"].computedValue}`, }, closeButton: { color: theme.colors["palette-gray-600"].computedValue, }, submitButton: { backgroundColor: theme.colors["palette-blue-600"].computedValue, color: theme.colors["palette-static-white"].computedValue, }, }; return isOpen ? (

다이얼로그 제목

다이얼로그 내용
) : null; }; export { semanticColors, scaleColors, staticColors, Component, Dialog }; ```
### replace-css-seed-design-color-variable ```bash npx @seed-design/codemod replace-css-seed-design-color-variable ``` ```bash pnpm dlx @seed-design/codemod replace-css-seed-design-color-variable ``` ```bash yarn dlx @seed-design/codemod replace-css-seed-design-color-variable ``` ```bash bun x @seed-design/codemod replace-css-seed-design-color-variable ``` ```css title="basic.input.css" :root[data-seed] { --seed-alert-dialog-backdrop-background: var(--seed-semantic-color-overlay-dim); --seed-alert-dialog-content-background: var(--seed-semantic-color-paper-dialog); --seed-alert-dialog-title-color: var(--seed-scale-color-gray-900); --seed-alert-dialog-description-color: var(--seed-scale-color-gray-900); --seed-box-button-focus-border: 2px solid var(--seed-scale-color-blue-600); box-shadow: 0 0 0 2px var(--seed-scale-color-blue-600); background: linear-gradient(to bottom, var(--seed-scale-color-blue-600), var(--seed-scale-color-blue-700)); } ``` ```css title="basic.output.css" :root[data-seed] { --seed-alert-dialog-backdrop-background: var(--seed-color-bg-overlay); --seed-alert-dialog-content-background: var(--seed-color-bg-layer-floating); --seed-alert-dialog-title-color: var(--seed-color-palette-gray-1000); --seed-alert-dialog-description-color: var(--seed-color-palette-gray-1000); --seed-box-button-focus-border: 2px solid var(--seed-color-palette-blue-600); box-shadow: 0 0 0 2px var(--seed-color-palette-blue-600); background: linear-gradient(to bottom, var(--seed-color-palette-blue-600), var(--seed-color-palette-blue-800)); } ``` ### replace-react-icon ```bash npx @seed-design/codemod replace-react-icon ``` ```bash pnpm dlx @seed-design/codemod replace-react-icon ``` ```bash yarn dlx @seed-design/codemod replace-react-icon ``` ```bash bun x @seed-design/codemod replace-react-icon ``` ```tsx title="basic.input.tsx" // @ts-nocheck import { IconSellRegular, IconListFill, IconAddFill as AddIconAlias, } from "@seed-design/react-icon"; import IconSellFill from "@seed-design/react-icon/IconSellFill"; import IconAddThin from '@karrotmarket/karrot-ui-icon/lib/react/IconAddThin'; import IconCloseThin from '@karrotmarket/karrot-ui-icon/lib/react/IconCloseThin'; import IconCarRegular from '@karrotmarket/karrot-ui-icon/lib/react/IconCarRegular'; function App() { console.log(IconSellRegular); return ( <> ); } ``` ```tsx title="basic.output.tsx" // @ts-nocheck import { IconPlusSquareLine, IconDothorizline3VerticalFill, IconPlusFill as AddIconAlias, } from "@daangn/react-monochrome-icon"; import IconPlusSquareFill from "@daangn/react-monochrome-icon/IconPlusSquareFill"; import IconPlusLine from "@daangn/react-monochrome-icon/IconPlusLine"; import IconXmarkLine from "@daangn/react-monochrome-icon/IconXmarkLine"; import IconCarFrontsideLine from "@daangn/react-monochrome-icon/IconCarFrontsideLine"; function App() { console.log(IconPlusSquareLine); return (<> ); } ``` ### replace-seed-design-token-vars ```bash npx @seed-design/codemod replace-seed-design-token-vars ``` ```bash pnpm dlx @seed-design/codemod replace-seed-design-token-vars ``` ```bash yarn dlx @seed-design/codemod replace-seed-design-token-vars ``` ```bash bun x @seed-design/codemod replace-seed-design-token-vars ``` ```tsx title="basic.input.tsx" import { vars as legacyVars } from "@seed-design/design-token"; import { vars } from "@seed-design/css/vars"; import { vars as typoVars } from "@seed-design/css/vars/component/typography"; const color = vars.$color.palette.gray600; const typography = typoVars.textStyleT5Bold.enabled.root; const legacyColor = legacyVars.$static.color.staticWhiteAlpha50; ``` ```tsx title="basic.output.tsx" import { vars as legacyVars } from "@seed-design/design-token"; import { vars } from "@seed-design/css/vars"; import { vars as typoVars } from "@seed-design/css/vars/component/typography"; const color = vars.$color.palette.gray600; const typography = typoVars.textStyleT5Bold.enabled.root; const legacyColor = legacyVars.$static.color.staticWhiteAlpha50; ``` ### replace-custom-seed-design-text-component ```bash npx @seed-design/codemod replace-custom-seed-design-text-component ``` ```bash pnpm dlx @seed-design/codemod replace-custom-seed-design-text-component ``` ```bash yarn dlx @seed-design/codemod replace-custom-seed-design-text-component ``` ```bash bun x @seed-design/codemod replace-custom-seed-design-text-component ``` ```tsx title="basic.input.tsx" // @ts-nocheck import Text from 'components/Base/Text'; const Component = () => { return (
광고 노출 기준 앱 내 최근 활동 이력을 분석하여 이용자의 관심사와 관련성이 높은 게시글을 노출해요.
); }; ``` ```tsx title="basic.output.tsx" // @ts-nocheck import { Text } from "@seed-design/react"; const Component = () => { return ( (
광고 노출 기준 앱 내 최근 활동 이력을 분석하여 이용자의 관심사와 관련성이 높은 게시글을 노출해요.
) ); }; ```
### replace-seed-design-token-typography-classname ```bash npx @seed-design/codemod replace-seed-design-token-typography-classname ``` ```bash pnpm dlx @seed-design/codemod replace-seed-design-token-typography-classname ``` ```bash yarn dlx @seed-design/codemod replace-seed-design-token-typography-classname ``` ```bash bun x @seed-design/codemod replace-seed-design-token-typography-classname ``` ```tsx title="basic.input.tsx" // @ts-nocheck import { classNames } from "@seed-design/design-token"; import { style } from "@vanilla-extract/css"; const typography = { one: classNames.$semantic.typography.title2Regular, two: classNames.$semantic.typography.label3Regular, three: classNames.$semantic.typography.label5Regular, four: classNames.$semantic.typography.label6Regular, } export const footer = style([ classNames.$semantic.typography.caption1Regular, { padding: "16px", marginTop: "12px", color: vars.$scale.color.gray700, backgroundColor: vars.$semantic.color.paperContents, }, ]); ``` ```tsx title="basic.output.tsx" // @ts-nocheck import { text } from "@seed-design/css/recipes/text"; import { style } from "@vanilla-extract/css"; const typography = { one: text({ textStyle: "t7Regular" }), two: text({ textStyle: "t4Regular" }), three: text({ textStyle: "t1Regular" }), four: text({ textStyle: "t1Regular" }), } export const footer = style([ text({ textStyle: "t3Regular" }), { padding: "16px", marginTop: "12px", color: vars.$scale.color.gray700, backgroundColor: vars.$semantic.color.paperContents, }, ]); ``` ### replace-stitches-styled-color Stitches로 스타일링된 컴포넌트의 색상을 V3 형식으로 변환해요. #### 변환 내용 * Stitches `styled()` 함수에서 사용된 Seed Design V2 색상 토큰을 V3 색상 토큰으로 변환합니다. * 모든 색상 관련 스타일 속성(color, backgroundColor, borderColor 등)을 지원합니다. * 상태 변이(variants)에 적용된 색상 변경도 함께 변환합니다. #### 대상 파일 * `.tsx`, `.jsx`, `.ts`, `.js` 파일에서 Stitches 스타일링 사용 부분 #### 주의사항 * 기존 코드의 구조와 포맷을 최대한 유지하면서 색상 값만 변경합니다. * 커스텀 색상 값이나 CSS 변수는 변환하지 않습니다. ```bash npx @seed-design/codemod replace-stitches-styled-color ``` ```bash pnpm dlx @seed-design/codemod replace-stitches-styled-color ``` ```bash yarn dlx @seed-design/codemod replace-stitches-styled-color ``` ```bash bun x @seed-design/codemod replace-stitches-styled-color ``` ```tsx title="basic.input.tsx" // @ts-nocheck const SemanticColorTestComponent = styled('div', { // Semantic Color 테스트 color: '$primary-semantic', color: '$onPrimary-semantic', color: '$primaryLow-semantic', color: '$secondary-semantic', color: '$secondaryLow-semantic', color: '$success-semantic', color: '$successLow-semantic', color: '$warning-semantic', color: '$warningLow-semantic', color: '$danger-semantic', color: '$dangerLow-semantic', color: '$overlayDim-semantic', color: '$overlayLow-semantic', color: '$paperSheet-semantic', color: '$paperDialog-semantic', color: '$paperFloating-semantic', color: '$paperContents-semantic', color: '$paperDefault-semantic', color: '$paperBackground-semantic', color: '$paperAccent-semantic', color: '$primaryHover-semantic', color: '$primaryPressed-semantic', color: '$primaryLowHover-semantic', color: '$primaryLowActive-semantic', color: '$primaryLowPressed-semantic', color: '$grayHover-semantic', color: '$grayPressed-semantic', color: '$onPrimaryOverlay50-semantic', color: '$onPrimaryOverlay200-semantic', color: '$onPrimaryLowOverlay50-semantic', color: '$onPrimaryLowOverlay100-semantic', color: '$onPrimaryLowOverlay200-semantic', color: '$onGrayOverlay50-semantic', color: '$onGrayOverlay100-semantic', color: '$divider1-semantic', color: '$divider2-semantic', color: '$divider3-semantic', color: '$accent-semantic', color: '$inkText-semantic', color: '$inkTextLow-semantic', color: '$grayActive-semantic', }); const ScaleColorTestComponent = styled('div', { // Scale Color Gray 테스트 color: '$gray00', color: '$gray50', color: '$gray100', color: '$gray200', color: '$gray300', color: '$gray400', color: '$gray500', color: '$gray600', color: '$gray700', color: '$gray800', color: '$gray900', color: '$grayAlpha50', color: '$grayAlpha100', color: '$grayAlpha200', color: '$grayAlpha500', // Scale Color Carrot 테스트 color: '$carrot50', color: '$carrot100', color: '$carrot200', color: '$carrot300', color: '$carrot400', color: '$carrot500', color: '$carrot600', color: '$carrot700', color: '$carrot800', color: '$carrot900', color: '$carrot950', color: '$carrotAlpha50', color: '$carrotAlpha100', color: '$carrotAlpha200', // Scale Color Blue 테스트 color: '$blue50', color: '$blue100', color: '$blue200', color: '$blue300', color: '$blue400', color: '$blue500', color: '$blue600', color: '$blue700', color: '$blue800', color: '$blue900', color: '$blue950', color: '$blueAlpha50', color: '$blueAlpha100', color: '$blueAlpha200', // Scale Color Red 테스트 color: '$red50', color: '$red100', color: '$red200', color: '$red300', color: '$red400', color: '$red500', color: '$red600', color: '$red700', color: '$red800', color: '$red900', color: '$red950', color: '$redAlpha50', color: '$redAlpha100', color: '$redAlpha200', // Scale Color Green 테스트 color: '$green50', color: '$green100', color: '$green200', color: '$green300', color: '$green400', color: '$green500', color: '$green600', color: '$green700', color: '$green800', color: '$green900', color: '$green950', color: '$greenAlpha50', color: '$greenAlpha100', color: '$greenAlpha200', // Scale Color Yellow 테스트 color: '$yellow50', color: '$yellow100', color: '$yellow200', color: '$yellow300', color: '$yellow400', color: '$yellow500', color: '$yellow600', color: '$yellow700', color: '$yellow800', color: '$yellow900', color: '$yellow950', color: '$yellowAlpha50', color: '$yellowAlpha100', color: '$yellowAlpha200', // Scale Color Purple 테스트 color: '$purple50', color: '$purple100', color: '$purple200', color: '$purple300', color: '$purple400', color: '$purple500', color: '$purple600', color: '$purple700', color: '$purple800', color: '$purple900', color: '$purple950', }); const StaticColorTestComponent = styled('div', { // Static Color 테스트 color: '$black-static', color: '$white-static', color: '$gray900-static', color: '$carrot50-static', color: '$carrot800-static', color: '$green50-static', color: '$green800-static', color: '$yellow50-static', color: '$yellow800-static', color: '$red50-static', color: '$red800-static', color: '$blue50-static', color: '$blue800-static', color: '$blackAlpha200-static', color: '$blackAlpha500-static', color: '$whiteAlpha50-static', color: '$whiteAlpha200-static', }); // 복합 속성 테스트 const ComplexPropertyTestComponent = styled('div', { border: '1px solid $gray700', boxShadow: '0 0 10px $overlayDim-semantic', outline: '2px solid $accent-semantic', textDecoration: 'underline $danger-semantic', // 네스팅된 속성 테스트 '&:before': { borderBottom: '1px solid $divider1-semantic', background: '$paperContents-semantic', }, // 변형 테스트 variants: { theme: { primary: { background: '$primary-semantic', color: '$onPrimary-semantic', }, secondary: { background: '$secondaryLow-semantic', color: '$inkText-semantic', }, danger: { background: '$danger-semantic', color: '$white-static', } } } }); ``` ```tsx title="basic.output.tsx" // @ts-nocheck const SemanticColorTestComponent = styled('div', { // Semantic Color 테스트 color: "$bg-brand-solid", color: "$palette-static-white", color: "$palette-carrot-100", color: "$palette-gray-900", color: "$bg-neutral-weak", color: "$bg-positive-solid", color: "$bg-positive-weak", color: "$bg-warning-solid", color: "$bg-warning-weak", color: "$bg-critical-solid", color: "$bg-critical-weak", color: "$bg-overlay", color: "$bg-overlay-muted", color: "$bg-layer-floating", color: "$bg-layer-floating", color: "$bg-layer-floating", color: "$bg-layer-fill", color: "$bg-layer-default", color: "$bg-layer-basement", color: "$palette-carrot-100", color: "$bg-brand-solid-pressed", color: "$bg-brand-solid-pressed", color: "$palette-carrot-200", color: "$palette-carrot-100", color: "$palette-carrot-200", color: "$bg-neutral-weak-pressed", color: "$bg-neutral-weak-pressed", color: '$onPrimaryOverlay50-semantic', color: '$onPrimaryOverlay200-semantic', color: '$onPrimaryLowOverlay50-semantic', color: '$onPrimaryLowOverlay100-semantic', color: '$onPrimaryLowOverlay200-semantic', color: "$stroke-on-image", color: '$onGrayOverlay100-semantic', color: "$stroke-neutral-muted", color: "$stroke-neutral", color: "$palette-gray-400", color: "$bg-informative-solid", color: "$fg-neutral", color: "$fg-neutral-subtle", color: "$fg-neutral-muted", }); const ScaleColorTestComponent = styled('div', { // Scale Color Gray 테스트 color: "$palette-gray-00", color: "$palette-gray-100", color: "$palette-gray-200", color: "$palette-gray-300", color: "$palette-gray-400", color: "$palette-gray-500", color: "$palette-gray-600", color: "$palette-gray-700", color: "$palette-gray-800", color: "$palette-gray-900", color: "$palette-gray-1000", color: "$stroke-on-image", color: "$palette-gray-300", color: "$palette-gray-500", color: "$palette-gray-700", // Scale Color Carrot 테스트 color: "$palette-carrot-100", color: "$palette-carrot-200", color: "$palette-carrot-300", color: "$palette-carrot-400", color: "$palette-carrot-500", color: "$palette-carrot-600", color: "$palette-carrot-600", color: "$palette-carrot-700", color: "$palette-carrot-700", color: "$palette-carrot-800", color: "$palette-carrot-800", color: "$palette-carrot-100", color: "$palette-carrot-200", color: "$palette-carrot-200", // Scale Color Blue 테스트 color: "$palette-blue-100", color: "$palette-blue-200", color: "$palette-blue-300", color: "$palette-blue-400", color: "$palette-blue-400", color: "$palette-blue-600", color: "$palette-blue-600", color: "$palette-blue-800", color: "$palette-blue-900", color: "$palette-blue-900", color: "$palette-blue-1000", color: "$palette-blue-100", color: "$palette-blue-100", color: "$palette-blue-200", // Scale Color Red 테스트 color: "$palette-red-100", color: "$palette-red-200", color: "$palette-red-300", color: "$palette-red-400", color: "$palette-red-600", color: "$palette-red-700", color: "$palette-red-700", color: "$palette-red-800", color: "$palette-red-900", color: "$palette-red-900", color: "$palette-red-900", color: "$palette-red-100", color: "$palette-red-200", color: "$palette-red-300", // Scale Color Green 테스트 color: "$palette-green-100", color: "$palette-green-200", color: "$palette-green-300", color: "$palette-green-400", color: "$palette-green-500", color: "$palette-green-600", color: "$palette-green-700", color: "$palette-green-800", color: "$palette-green-900", color: "$palette-green-900", color: "$palette-green-900", color: "$palette-green-100", color: "$palette-green-200", color: "$palette-green-200", // Scale Color Yellow 테스트 color: "$palette-yellow-100", color: "$palette-yellow-200", color: "$palette-yellow-300", color: "$palette-yellow-400", color: "$palette-yellow-500", color: "$palette-yellow-700", color: "$palette-yellow-700", color: "$palette-yellow-800", color: "$palette-yellow-800", color: "$palette-yellow-900", color: "$palette-yellow-900", color: "$palette-yellow-100", color: "$palette-yellow-100", color: "$palette-yellow-100", // Scale Color Purple 테스트 color: "$palette-purple-100", color: "$palette-purple-300", color: "$palette-purple-400", color: "$palette-purple-400", color: "$palette-purple-500", color: "$palette-purple-600", color: "$palette-purple-700", color: "$palette-purple-800", color: "$palette-purple-900", color: "$palette-purple-900", color: "$palette-purple-1000", }); const StaticColorTestComponent = styled('div', { // Static Color 테스트 color: "$palette-static-black", color: "$palette-static-white", color: "$palette-static-black", color: "$palette-carrot-100", color: "$palette-carrot-700", color: "$palette-green-100", color: "$palette-green-700", color: "$palette-yellow-100", color: "$palette-yellow-700", color: "$palette-red-100", color: "$palette-red-700", color: "$palette-blue-100", color: "$palette-blue-700", color: "$palette-static-black-alpha-200", color: "$palette-static-black-alpha-500", color: '$whiteAlpha50-static', color: "$palette-static-white-alpha-200", }); // 복합 속성 테스트 const ComplexPropertyTestComponent = styled('div', { border: "1px solid $palette-gray-800", boxShadow: "0 0 10px $bg-overlay", outline: "2px solid $bg-informative-solid", textDecoration: "underline $bg-critical-solid", // 네스팅된 속성 테스트 '&:before': { borderBottom: "1px solid $stroke-neutral-muted", background: "$bg-layer-fill", }, // 변형 테스트 variants: { theme: { primary: { background: "$bg-brand-solid", color: "$palette-static-white", }, secondary: { background: "$bg-neutral-weak", color: "$fg-neutral", }, danger: { background: "$bg-critical-solid", color: "$palette-static-white", } } } }); ``` ### replace-custom-text-component-color-prop ```bash npx @seed-design/codemod replace-custom-text-component-color-prop ``` ```bash pnpm dlx @seed-design/codemod replace-custom-text-component-color-prop ``` ```bash yarn dlx @seed-design/codemod replace-custom-text-component-color-prop ``` ```bash bun x @seed-design/codemod replace-custom-text-component-color-prop ``` ```tsx title="basic.input.tsx" // @ts-nocheck const Component = () => { return ( <> ); }; ``` ```tsx title="basic.output.tsx" // @ts-nocheck const Component = () => { return (<> ); }; ``` ### replace-custom-seed-design-color 커스텀 Seed Design 컬러 토큰을 V3 형식으로 변환하는 트랜스폼 ```bash npx @seed-design/codemod replace-custom-seed-design-color ``` ```bash pnpm dlx @seed-design/codemod replace-custom-seed-design-color ``` ```bash yarn dlx @seed-design/codemod replace-custom-seed-design-color ``` ```bash bun x @seed-design/codemod replace-custom-seed-design-color ``` ```ts title="basic.input.ts" // @ts-nocheck import { style } from "@vanilla-extract/css"; import { color, background } from "@/shared/styles"; export const container = style({ backgroundColor: color.gray100, color: color.gray900, borderColor: color.carrot500, }); export const box = style({ background: color.gray50, color: color.red500, border: `1px solid ${color.gray300}`, }); export const alert = style({ backgroundColor: color.red50, color: color.red900, }); export const button = style({ backgroundColor: background.gray100, color: color.gray900, }); export const highlight = style({ color: color.carrot500, }); ``` ```ts title="basic.output.ts" // @ts-nocheck import { style } from "@vanilla-extract/css"; import { color, background } from "@/shared/styles"; export const container = style({ backgroundColor: color.palette.gray200, color: color.palette.gray1000, borderColor: color.palette.carrot600, }); export const box = style({ background: color.palette.gray100, color: color.palette.red700, border: `1px solid ${color.palette.gray400}`, }); export const alert = style({ backgroundColor: color.palette.red100, color: color.palette.red900, }); export const button = style({ backgroundColor: background.palette.gray200, color: color.palette.gray1000, }); export const highlight = style({ color: color.palette.carrot600, }); ``` ### replace-css-seed-design-typography-variable ```bash npx @seed-design/codemod replace-css-seed-design-typography-variable ``` ```bash pnpm dlx @seed-design/codemod replace-css-seed-design-typography-variable ``` ```bash yarn dlx @seed-design/codemod replace-css-seed-design-typography-variable ``` ```bash bun x @seed-design/codemod replace-css-seed-design-typography-variable ``` ```css title="basic.input.css" /* Radio Label */ .seed-radio-group[data-size="small"] [data-part="radio-label"] { margin-inline-start: var(--seed-radio-small-label-margin-inline-start); margin-block-start: var(--seed-radio-small-label-margin-block-start); font-size: var(--seed-semantic-typography-label4-regular-font-size); font-weight: var(--seed-semantic-typography-label4-regular-font-weight); line-height: var(--seed-semantic-typography-label4-regular-line-height); letter-spacing: var(--seed-semantic-typography-label4-regular-letter-spacing); } .seed-radio-group[data-size="medium"] [data-part="radio-label"] { margin-inline-start: var(--seed-radio-medium-label-margin-inline-start); margin-block-start: var(--seed-radio-medium-label-margin-block-start); font-size: var(--seed-semantic-typography-label3-regular-font-size); font-weight: var(--seed-semantic-typography-label3-regular-font-weight); line-height: var(--seed-semantic-typography-label3-regular-line-height); letter-spacing: var(--seed-semantic-typography-label3-regular-letter-spacing); } .seed-radio-group[data-size="large"] [data-part="radio-label"] { margin-inline-start: var(--seed-radio-large-label-margin-inline-start); margin-block-start: var(--seed-radio-large-label-margin-block-start); font-size: var(--seed-semantic-typography-label2-regular-font-size); font-weight: var(--seed-semantic-typography-label2-regular-font-weight); line-height: var(--seed-semantic-typography-label2-regular-line-height); letter-spacing: var(--seed-semantic-typography-label2-regular-letter-spacing); } ``` ```css title="basic.output.css" /* Radio Label */ .seed-radio-group[data-size="small"] [data-part="radio-label"] { margin-inline-start: var(--seed-radio-small-label-margin-inline-start); margin-block-start: var(--seed-radio-small-label-margin-block-start); font-size: var(--seed-font-size-t2); font-weight: var(--seed-font-weight-regular); line-height: var(--seed-line-height-t2); letter-spacing: normal; } .seed-radio-group[data-size="medium"] [data-part="radio-label"] { margin-inline-start: var(--seed-radio-medium-label-margin-inline-start); margin-block-start: var(--seed-radio-medium-label-margin-block-start); font-size: var(--seed-font-size-t4); font-weight: var(--seed-font-weight-regular); line-height: var(--seed-line-height-t4); letter-spacing: normal; } .seed-radio-group[data-size="large"] [data-part="radio-label"] { margin-inline-start: var(--seed-radio-large-label-margin-inline-start); margin-block-start: var(--seed-radio-large-label-margin-block-start); font-size: var(--seed-font-size-t5); font-weight: var(--seed-font-weight-regular); line-height: var(--seed-line-height-t5); letter-spacing: normal; } ``` ### replace-tailwind-color Tailwind CSS 색상 클래스를 Seed Design V3 형식으로 변환해요. #### 변환 내용 * Seed Design V2의 색상 클래스 네이밍을 V3 형식으로 변환합니다. * `text-`, `bg-`, `border-` 등의 접두사를 가진 Tailwind 색상 클래스를 변환합니다. * 색상 강도(shade)에 따른 변환 매핑을 적용합니다. #### 변환 예시 * `text-carrot-500` → `text-static-orange-base` * `bg-salmon-100` → `bg-static-red-light` * `border-navy-900` → `border-static-blue-dark` #### 대상 파일 * `.tsx`, `.jsx`, `.ts`, `.js`, `.html`, `.css` 파일에서 Tailwind 클래스를 사용하는 부분 #### 주의사항 * className 문자열, 템플릿 리터럴, 배열 형태 모두 지원합니다. * Tailwind 동적 클래스 조합(`clsx`, `cx`, `classnames` 등)도 변환됩니다. ```bash npx @seed-design/codemod replace-tailwind-color ``` ```bash pnpm dlx @seed-design/codemod replace-tailwind-color ``` ```bash yarn dlx @seed-design/codemod replace-tailwind-color ``` ```bash bun x @seed-design/codemod replace-tailwind-color ``` ```tsx title="basic.input.tsx" // @ts-nocheck export function BackgroundExample() { return (
Primary Background
Primary Low Background
Hover Primary Low Background
Focus Primary Low Background
Active Primary Low Background
Scale Background
Scale Carrot Low Background
Scale Carrot Mid Background
Scale Carrot High Background
Scale Carrot High Background
Scale Carrot High Background
Scale Carrot High Background
Scale Carrot High Background
Scale Carrot High Background
Scale Carrot High Background
Scale Carrot High Background
Static Black Background
Static White Background
Static Gray900 Background
); } ``` ```tsx title="basic.output.tsx" // @ts-nocheck export function BackgroundExample() { return ( (
Primary Background
Primary Low Background
Hover Primary Low Background
Focus Primary Low Background
Active Primary Low Background
Scale Background
Scale Carrot Low Background
Scale Carrot Mid Background
Scale Carrot High Background
Scale Carrot High Background
Scale Carrot High Background
Scale Carrot High Background
Scale Carrot High Background
Scale Carrot High Background
Scale Carrot High Background
Scale Carrot High Background
Static Black Background
Static White Background
Static Gray900 Background
) ); } ```
file: ./content/react/get-started/llms-txt.mdx # LLMs.txt 대규모 언어 모델(LLM)이 SEED Design React를 쉽게 이해할 수 있도록 LLMs.txt를 제공합니다. ## 구조 다음과 같은 LLMs.txt 파일들을 제공합니다: * [llms.txt](https://seed-design.io/react/llms.txt): LLMs.txt 파일들의 구조를 제공하는 메인 파일입니다. * [llms-full.txt](https://seed-design.io/react/llms-full.txt): SEED Design React의 모든 문서를 포함합니다. * [llms-components.txt](https://seed-design.io/react/llms-components.txt): 컴포넌트 문서만을 포함하고 있어 context window가 제한된 경우 유용합니다. ## AI 도구와 함께 사용하기 ### Cursor Cursor의 `@Docs` 기능을 사용하여 프로젝트에 LLMs.txt 파일을 포함할 수 있습니다. [Cursor @Docs에 대해 자세히 알아보기](https://docs.cursor.com/context/@-symbols/@-docs) file: ./content/react/get-started/mcp.mdx # MCP AI Agent를 활용해 생산성을 높일 수 있는 Model Context Protocol(MCP)를 제공합니다. ## 설치 ### Prerequisites * [Bun](https://bun.sh/docs/installation) ### Cursor Cursor Settings > MCP > Add MCP Server 에 다음 설정을 추가합니다. ```json { "mcpServers": { "SEED Design": { "command": "bunx", "args": ["-y", "@seed-design/mcp"], "type": "stdio" } } } ``` [Cursor MCP에 대해 자세히 알아보기](https://docs.cursor.com/context/model-context-protocol) ### Figma [Figma MCP 플러그인](https://www.figma.com/community/plugin/1496384010980477154)을 설치합니다. ## 사용법 ### 웹소켓 서버 실행 ```bash bunx --bun @seed-design/mcp socket ``` ### Figma 플러그인 실행 설치된 SEED Design MCP 플러그인을 실행합니다. ### 채널 연결 실행된 Figma 플러그인에 채널이 표기됩니다. 예시: ``` Connected to server on port 3055 in channel: onh8wul9 ``` 에이전트에 아래 프롬프트를 전달해 웹소켓 서버와 채널을 연결합니다. ``` join_channel {채널명} ``` 연결이 완료되면, `선택된 노드를 참고해 React로 구현해주세요.` 와 같은 요청을 전달할 수 있습니다. ## 주요 툴 목록 ### `join_channel` 웹소켓 서버와 채널을 연결합니다. ### `get_selection` 선택한 노드의 id를 반환합니다. ### `get_node_react_code` 노드의 React codegen 결과를 반환합니다. ### `export_node_as_image` 노드의 이미지를 반환합니다. [Playwright MCP](https://github.com/microsoft/playwright-mcp) 등과 통합해 이미지 단위 비교에 활용할 수 있습니다. ### `add_annotations` Figma 파일에 Annotation을 추가합니다. [참고](https://help.figma.com/hc/en-us/articles/20774752502935-Add-measurements-and-annotate-designs) ## 커스텀 설정 사용하기 `--config` 플래그를 통해 커스텀 설정 파일을 로드할 수 있습니다. ```bash bunx --bun @seed-design/mcp --config /path/to/config.ts ``` ### 지원하는 설정 파일 형식 `@seed-design/mcp`는 다음 확장자의 설정 파일을 지원합니다: * `.js` * `.mjs` * `.ts` * `.mts` ### 설정 파일 예시 ```typescript import { type react, defineComponentHandler, createElement } from "@seed-design/figma"; export default { extend: { componentHandlers: [ (_deps: react.ComponentHandlerDeps) => defineComponentHandler( "figma_component_key", ({ componentProperties: props }) => { const tone = props.Tone.value.toLowerCase(); return createElement( "CustomButton", { tone } ); } ) ] }, } satisfies react.CreatePipelineConfig; ``` ### MCP로 ComponentHandler 작성하기 #### 1. 프롬프트 복사 아래 프롬프트를 복사해 파일로 저장합니다. Cursor IDE를 사용하는 경우, [Cursor rule](https://docs.cursor.com/context/rules)로 저장할 수 있습니다. ```markdown # ComponentHandler Implementation Guide ## Initial Context Gathering 1. **Analyze Figma Selection**: - Use \`get_selection()\` to examine the currently selected node(s) - If no selection exists, prompt the user to select a specific component node - Verify the selected node is a component that can be transformed 2. **Retrieve Component Information**: - Use \`get_component_info(nodeId)\` to extract detailed information about the component - Collect the component key, all component properties, and variant definitions - Identify any nested components or instances that might need special handling ## Component Analysis and Planning 3. **Determine Component Structure**: - Analyze the component's visual structure, layout, and behavior patterns - If the target React component implementation is unknown, request an example or props interface - Identify which Figma properties should map to which React props 4. **Define Transformation Strategy**: - Plan how to handle variants, properties, nested components and children - Determine if additional utilities or helper functions are needed - Consider edge cases and special requirements for this component ## Implementation 5. **Create Component Handler**: - Implement the handler using the following pattern: \`\`\`typescript import { createElement, defineComponentHandler, type InferComponentDefinition, type react, } from "@seed-design/figma"; // Define component properties based on Figma definition export type ComponentNameProperties = InferComponentDefinition<{ // Map all component properties from Figma // Example: "PropertyName": { type: "VARIANT" | "TEXT" | "BOOLEAN" | "INSTANCE_SWAP", variantOptions?: string[], // For VARIANT type defaultValue?: string | boolean } }>; // Create and export the handler export const createComponentNameHandler = (_deps: react.ComponentHandlerDeps) => defineComponentHandler( "component-key-from-figma", // Replace with actual component key ({ componentProperties: props }) => { // Transform Figma properties to React props // Use conditionals for variants and property handling return createElement( "ComponentName", // The React component name { // Map properties appropriately propName: props.PropertyName.value, // Add additional props as needed }, [], // Nested elements if any (undefined or omitted if not needed) "Optional comment for accessibility or development notes, use sparingly" ); } ); \`\`\` ## Validation and Testing 6. **Verify Handler Functionality**: - Test the handler with different component variants - Ensure all properties are correctly mapped and transformed - Check that nested components and children are handled properly ## Best Practices - Create reusable helper functions for common transformation patterns - Handle edge cases and optional properties gracefully - Add descriptive comments for complex transformations - Consider performance implications for deeply nested components - Ensure type safety throughout the transformation process ``` #### 2. 프롬프트 실행 저장된 프롬프트 파일과 구현해야 할 컴포넌트 파일을 맥락으로 전달하며 프롬프트를 실행합니다. **예시**: ```bash @CustomButton.tsx @ComponentHandlerRule.md CustomButton 컴포넌트의 ComponentHandler를 구현해주세요. ``` #### 3. 결과 확인 프롬프트 실행 결과로 생성된 ComponentHandler를 확인합니다. **예시** ```typescript import { createElement, defineComponentHandler, type InferComponentDefinition, type react, } from "@seed-design/figma"; export type CustomButtonProperties = InferComponentDefinition<{ tone: { type: "VARIANT"; variantOptions: ["neutral", "brand"]; }; }>; export const createCustomButtonHandler = (_deps: react.ComponentHandlerDeps) => defineComponentHandler( "figma_component_key", ({ componentProperties: props }) => { const tone = props.tone.value.toLowerCase(); return createElement( "CustomButton", { tone } ); } ) ``` #### 4. 설정 파일 적용 생성된 ComponentHandler를 설정 파일에 추가합니다. ```typescript import { type react } from "@seed-design/figma"; import { createCustomButtonHandler } from "./CustomButton"; export default { extend: { componentHandlers: [ createCustomButtonHandler, ] }, } satisfies react.CreatePipelineConfig; ``` file: ./content/react/get-started/seed-design-json.mdx # seed-design.json [@seed-design/cli](./cli) 를 사용할 때 필요한 설정들을 명시할 파일이에요. ## 설정 `seed-design.json` 파일을 생성하기 위한 명령어에요. ### init 명령어 입력하기 ```sh npx @seed-design/cli@latest init ``` ### seed-design 설정 ```sh ◇ TypeScript를 사용중이신가요? │ Yes │ ◇ React Server Components를 사용중이신가요? │ No │ ◇ seed-design 폴더 경로를 입력해주세요. (기본값은 프로젝트 루트에 생성됩니다.) │ ./seed-design ``` 아래 파일을 프로젝트 루트에 생성해주세요. ```json title="seed-design.json" { "rsc": false, "tsx": true, "path": "./seed-design" } ``` ## 옵션 ### path `path`는 생성되는 컴포넌트의 기본 경로를 설정해요. seed-design이 필요로 하는 폴더나 파일들은 `path`로 지정된 경로의 하위에 생겨요. `seed-design`의 root 폴더는 유저가 입력할 수 있게 하되, 그 내부에 생성되는 폴더나 파일들은 고정되는 형식이에요. ```json title="seed-design.json" { "path": "./seed-design" } ``` 만약 위와 같이 설정했다면, `./seed-design` 폴더가 생성이 되고, 그 안에 `ui`, `utils`, `hooks`와 같은 폴더들이 생기게 될거에요. ### rsc 리액트 서버 컴포넌트를 사용할지 여부를 설정해요. `true`로 설정하면 컴포넌트에 `use client` directive가 추가돼요. ```json title="seed-design.json" { "rsc": true | false (default: false) } ``` ### tsx 타입스크립트를 사용할지 여부를 설정해요. `true`로 설정하면 컴포넌트에 `.tsx` 확장자이고, `false`로 설정하면 `.jsx` 확장자로 생성돼요. ```json title="seed-design.json" { "tsx": true | false (default: true) } ``` ### $schema 준비중이에요. file: ./content/react/iconography/codemod.mdx # Codemod SEED V2 아이콘을 V3 아이콘으로 변환하는 Codemod ## 업그레이드 방법 현재 아이콘을 사용하고 있는 방법에 따라 적용할 수 있는 2가지 방법이 있어요. ### Codemod 스크립트 아래 3개 아이콘 패키지를 사용하고 있다면, 제공되는 codemod 스크립트를 사용해서 리뉴얼된 아이콘 패키지로 손쉽게 업그레이드할 수 있어요. * [`@seed-deesign/react-icon`](https://www.npmjs.com/package/@seed-design/react-icon) * [`@seed-design/icon`](https://www.npmjs.com/package/@seed-design/icon) (deprecated) * [`@karrotmarket/karrot-ui-icon`](https://www.npmjs.com/package/@karrotmarket/karrot-ui-icon) (deprecated) (React 컴포넌트를 사용하는 경우) 3개 패키지에서 사용하고 있는 아이콘은 [`@karrotmarket/react-monochrome-icon`](https://github.com/daangn/seed-icon-v3/pkgs/npm/react-monochrome-icon)의 아이콘으로 대체돼요. ### 수동 업그레이드 다음과 같은 경우에는 수동으로 업그레이드해야 해요. * PNG, SVG 등의 파일로 기존 아이콘을 사용하는 경우 * [`@karrotmarket/karrot-ui-icon`](https://www.npmjs.com/package/@karrotmarket/karrot-ui-icon) (deprecated)에서 제공되는 SVG 파일을 사용하는 경우 * 다음 패키지를 사용하는 경우 * [`@seed-design/vue2-icon`](https://www.npmjs.com/package/@seed-design/vue2-icon) → [`@daangn/vue2-monochrome-icon`](https://github.com/daangn/seed-icon-v3/pkgs/npm/vue2-monochrome-icon)으로 대체돼요. * [`@seed-design/vue3-icon`](https://www.npmjs.com/package/@seed-design/vue3-icon) → [`@daangn/vue3-monochrome-icon`](https://github.com/daangn/seed-icon-v3/pkgs/npm/vue3-monochrome-icon)으로 대체돼요. ## 작업 순서 많은 변경사항이 발생하게 되므로, 커밋하지 않은 변경사항이 없는지 확인하고 시작하는 것이 좋아요. ### Codemod 스크립트 실행 전 ```tsx import { IconSellRegular, IconListFill, IconCarRegular, IconAddFill as AddIconAlias, } from "@seed-design/react-icon"; import IconSellFill from "@seed-design/react-icon/IconSellFill"; function App() { console.log(IconSellRegular); return ( <> ); } ``` 실행 후 ```tsx import { IconPlusSquareLine, IconDothorizline3VerticalFill, IconCarFrontsideLine, IconPlusFill as AddIconAlias, } from "@karrotmarket/react-monochrome-icon"; import IconPlusSquareFill from "@karrotmarket/react-monochrome-icon/IconPlusSquareFill"; function App() { console.log(IconPlusSquareLine); return ( <> ); } ``` #### 리뉴얼된 아이콘 패키지 설치 ```bash npm install @karrotmarket/react-monochrome-icon @karrotmarket/react-multicolor-icon ``` ```bash pnpm add @karrotmarket/react-monochrome-icon @karrotmarket/react-multicolor-icon ``` ```bash yarn add @karrotmarket/react-monochrome-icon @karrotmarket/react-multicolor-icon ``` ```bash bun add @karrotmarket/react-monochrome-icon @karrotmarket/react-multicolor-icon ``` 2개 패키지 중 필요한 패키지만 설치해요. * [`@karrotmarket/react-monochrome-icon`](https://github.com/daangn/seed-icon-v3/pkgs/npm/react-monochrome-icon) * 단색 아이콘 패키지에요. **일반** 아이콘, **카테고리** 아이콘, **서비스** 아이콘이 포함되어 있어요. * 이 패키지에서 제공되는 서비스 아이콘은 검은색으로만 사용할 수 있어요. * codemod 실행 시, 기존 패키지들의 아이콘은 모두 이 패키지의 아이콘으로 대체돼요. * [`@karrotmarket/react-multicolor-icon`](https://github.com/daangn/seed-icon-v3/pkgs/npm/react-multicolor-icon) * 멀티컬러 아이콘 패키지에요. **카테고리** 아이콘과 **서비스** 아이콘이 포함되어 있어요. * 이 패키지에서 제공되는 카테고리 아이콘과 서비스 아이콘은 패키지에서 제공되는 색상 그대로만 사용할 수 있어요. * 기존에 SVG로 사용하던 멀티컬러 아이콘들을 이 패키지로 직접 대체할 수 있어요. 따라서, 필요한 경우에만 설치해도 좋아요. #### Codemod 스크립트 실행 경로 내의 코드를 일괄적으로 변환하는 codemod 스크립트를 실행해요. ```shell npx @seed-design/codemod migrate-icons <...경로> <옵션> ``` ```shell npx @seed-design/codemod migrate-icons src ``` 스크립트 실행을 위해서는 **Node.js 20.16.0 이상**의 버전이 필요해요. 버전 요구사항을 만족시키지 않으면 안내 문구가 표시돼요. nvm을 사용한다면 codemod 실행을 위해 Node.js 버전을 잠시 변경할 수 있어요. ```shell nvm install 20.16 ``` * `--log` * 로그를 파일로 저장해요. * `./`에 `migrate-icons-combined.log`와 `migrate-icons-warnings.log` 파일이 생성돼요. * [`--extensions`](https://jscodeshift.com/run/cli/#--extensionsext) * 변환할 파일 확장자를 지정해요. * 이 옵션을 지정하지 않으면 경로 안의 `js`, `jsx`, `ts`, `tsx` 파일을 변환해요. (`d.ts` 제외) * 예시: `--extensions="ts,tsx"` * [`--ignore-config`](https://jscodeshift.com/run/cli/#--ignore-configfile) * 변환하지 않을 경로들을 glob 패턴으로 작성한 파일을 지정해요. * 예시: `--ignore-config=".gitignore"` * 이 옵션을 지정하지 않아도 jscodeshift에 의해 `**/node_modules/**`는 자동으로 무시돼요. #### 결과 확인 문제 없이 모든 변환이 완료된 경우 다음과 같은 결과가 표시돼요. ``` All done. Results: 0 errors // [!code highlight] 439 unmodified 1 skipped 27 ok Time elapsed: 43.376seconds ``` * `errors`: 파싱 오류 등으로 인해, 아이콘을 참조하는 코드가 있는지 확인하지 못한 파일의 수에요. * 에러가 발생한 파일에 이전 아이콘을 참조하는 코드가 없다면, 해당 파일에서 발생하는 에러는 무시해도 좋아요. * 이전 아이콘을 참조하는 코드가 있다면, 문제가 발생한 부분을 수정하고 다시 스크립트를 실행하거나, 해당 파일의 아이콘 마이그레이션을 직접 진행해주세요. * `unmodified`: 아이콘을 참조하는 코드가 없어, 아무 변환도 이루어지지 않은 파일의 수에요. * `skipped`: 빈 파일 등 변환 대상이 아니어서, 아무 변환도 이루어지지 않은 파일의 수에요. * `ok`: 변환이 이루어진 파일의 수에요. ``` ERR /Users/seed/foo/bar.js Transformation error (Unexpected reserved word 'package'. (3:3)) ``` codemod 스크립트 실행 중 파싱 오류가 발생할 수 있어요. 파싱 오류는 다음과 같은 이유로 발생해요. * `assert`를 사용한 [import assertion](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-3.html#import-attributes)과 같은, deprecated된 문법이 있는 경우 * `package`와 같은 예약어를 변수 이름으로 사용한 경우 등 #### 코드 포맷 프로젝트에서 사용하는 포매터를 사용해서 코드를 포맷해요. #### 이전 패키지 제거 이전 아이콘이 모두 대체된 것을 확인하고, 이전 패키지를 제거해요. ```bash npm uninstall @seed-design/icon @seed-design/react-icon @karrotmarket/karrot-ui-icon ``` ```bash pnpm remove @seed-design/icon @seed-design/react-icon @karrotmarket/karrot-ui-icon ``` ```bash yarn remove @seed-design/icon @seed-design/react-icon @karrotmarket/karrot-ui-icon ``` ```bash bun remove @seed-design/icon @seed-design/react-icon @karrotmarket/karrot-ui-icon ``` #### 사이드 이펙트 확인 * [사이드 이펙트](#발생-가능한-사이드-이펙트)가 발생했는지 확인하여 의도한 대로 변경이 이루어졌는지 검토해요. * 디자인 QA 과정에서, 자동으로 변경된 아이콘이 아닌 새로운 아이콘을 사용하도록 결정되었을 수 있어요. 이러한 경우, Figma 디자인 파일을 참고하여 코드에 반영해요. * 멀티컬러 아이콘 사용이 필요한 곳에는 [멀티컬러 아이콘 패키지](https://github.com/daangn/seed-icon-v3/pkgs/npm/react-multicolor-icon)를 사용해주세요. ### 수동 업그레이드 #### 이전 패키지 제거 이전 아이콘 패키지들을 제거해요. ```bash npm uninstall @seed-design/icon @seed-design/react-icon @karrotmarket/karrot-ui-icon @seed-design/vue2-icon @seed-design/vue3-icon ``` ```bash pnpm remove @seed-design/icon @seed-design/react-icon @karrotmarket/karrot-ui-icon @seed-design/vue2-icon @seed-design/vue3-icon ``` ```bash yarn remove @seed-design/icon @seed-design/react-icon @karrotmarket/karrot-ui-icon @seed-design/vue2-icon @seed-design/vue3-icon ``` ```bash bun remove @seed-design/icon @seed-design/react-icon @karrotmarket/karrot-ui-icon @seed-design/vue2-icon @seed-design/vue3-icon ``` #### 리뉴얼된 패키지 설치 ##### React ```bash npm install @karrotmarket/react-monochrome-icon @karrotmarket/react-multicolor-icon ``` ```bash pnpm add @karrotmarket/react-monochrome-icon @karrotmarket/react-multicolor-icon ``` ```bash yarn add @karrotmarket/react-monochrome-icon @karrotmarket/react-multicolor-icon ``` ```bash bun add @karrotmarket/react-monochrome-icon @karrotmarket/react-multicolor-icon ``` ##### Vue 2 ```bash npm install @daangn/vue2-monochrome-icon @daangn/vue2-multicolor-icon ``` ```bash pnpm add @daangn/vue2-monochrome-icon @daangn/vue2-multicolor-icon ``` ```bash yarn add @daangn/vue2-monochrome-icon @daangn/vue2-multicolor-icon ``` ```bash bun add @daangn/vue2-monochrome-icon @daangn/vue2-multicolor-icon ``` ##### Vue 3 ```bash npm install @daangn/vue3-monochrome-icon @daangn/vue3-multicolor-icon ``` ```bash pnpm add @daangn/vue3-monochrome-icon @daangn/vue3-multicolor-icon ``` ```bash yarn add @daangn/vue3-monochrome-icon @daangn/vue3-multicolor-icon ``` ```bash bun add @daangn/vue3-monochrome-icon @daangn/vue3-multicolor-icon ``` 2개 패키지 중 필요한 패키지만 설치해요. * `@daangn/*-monochrome-icon` * 단색 아이콘 패키지에요. **일반** 아이콘, **카테고리** 아이콘, **서비스** 아이콘이 포함되어 있어요. * 이 패키지에서 제공되는 서비스 아이콘은 검은색으로만 사용할 수 있어요. * codemod 실행 시, 기존 패키지들의 아이콘은 모두 이 패키지의 아이콘으로 대체돼요. * `@daangn/*-multicolor-icon` * 멀티컬러 아이콘 패키지에요. **카테고리** 아이콘과 **서비스** 아이콘이 포함되어 있어요. * 이 패키지에서 제공되는 카테고리 아이콘과 서비스 아이콘은 패키지에서 제공되는 색상 그대로만 사용할 수 있어요. * 기존에 SVG로 사용하던 멀티컬러 아이콘들을 이 패키지로 직접 대체할 수 있어요. 따라서, 필요한 경우에만 설치해도 좋아요. #### 아이콘 이름 변경 [V2 V3 아이콘 맵핑](/react/foundation/iconography/v2-v3-list) 문서를 참고하여 리뉴얼된 패키지를 사용하도록 코드를 수정해요. * 기존 아이콘의 `IconHome*`은 신규 아이콘에서 `IconHouse*`로 이름이 바뀌었어요. * 기존 아이콘의 `IconHouse*`는 신규 아이콘에서 `IconWindow4House*`로 이름이 바뀌었어요. 따라서, 수동 마이그레이션 시 `IconHome*`이 `IconWindow4House*`로 잘못 변경되지 않게 주의해야 해요. **`IconHouse*`를 먼저 마이그레이션**하고, `IconHome*`을 마이그레이션하는 것을 추천해요. #### 사이드 이펙트 확인 * [사이드 이펙트](#발생-가능한-사이드-이펙트)가 발생했는지 확인하여 의도한 대로 변경이 이루어졌는지 검토해요. * 디자인 QA 과정에서, [V2 V3 아이콘 맵핑](/react/foundation/iconography/v2-v3-list)에 따른 아이콘이 아닌 새로운 아이콘을 사용하도록 결정되었을 수 있어요. 이러한 경우, Figma 디자인 파일을 참고하여 코드에 반영해요. * 멀티컬러 아이콘 사용이 필요한 곳에는 [멀티컬러 아이콘 패키지](https://github.com/daangn/seed-icon-v3/pkgs/npm/react-multicolor-icon)를 사용해주세요. ## 발생 가능한 사이드 이펙트 ### 정확히 대응되는 리뉴얼된 아이콘이 없는 경우 * 이전 아이콘 중 아래 5개 아이콘(총 15개 variant)은 리뉴얼된 아이콘 패키지에 시각적으로 정확히 대응되는 항목이 없어요. * codemod 스크립트 실행 시 **추천되는 아이콘으로 변환되지만**, 시각적인 차이가 크기 때문에 변경 후 확인이 필요해요. | 이전 아이콘 이름 | 리뉴얼된 아이콘 이름 | | --------------------------------------- | ---------------------------------------------------------------------------------------- | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * codemod 스크립트 사용 시, 5개 아이콘(총 15개 variant)이 사용된 경우 터미널에 메시지가 출력돼요. ``` REP ...을 ...로 변경했지만, 변경된 아이콘이 적절한지 확인이 필요해요 ``` * codemod 스크립트를 `--log` flag와 함께 사용 시, 사용된 내역이 `migrate-icons-warnings.log`에 기록돼요. * 다음을 활용하여 코드를 직접 검색할 수 있어요. ```regex tab="정규 표현식" (IconBold|IconCobuying|IconDelivery|IconSuggest|IconWriteStory)(Thin|Regular|Fill)|(IconTUppercaseSerif|IconShoppingbag2Stacked|IconTruck|IconLightbulbDot5|IconHorizline2VerticalChatbubbleRight)(Line|Fill) ``` ```shell tab="git grep" git grep -E '(IconBold|IconCobuying|IconDelivery|IconSuggest|IconWriteStory)(Thin|Regular|Fill)|(IconTUppercaseSerif|IconShoppingbag2Stacked|IconTruck|IconLightbulbDot5|IconHorizline2VerticalChatbubbleRight)(Line|Fill)' ``` ### 여러 이전 아이콘이 하나의 리뉴얼된 아이콘으로 대체되는 경우 **이전 아이콘과 리뉴얼된 아이콘은 `n:1`로 대응돼요.** 따라서, 같은 페이지에 표시되었던 서로 다른 여러 개의 아이콘이, 동일한 리뉴얼된 아이콘으로 대체되는 경우가 있어요. 의도한 목적대로 아이콘이 표시되는지 확인해요. * 한 이전 아이콘의 3개 variant 중 `Thin` variant와 `Regular` variant는 리뉴얼된 아이콘에서 모두 `Line` variant로 대체돼요. * 예를 들면, `IconForwardThin`, `IconForwardRegular`는 모두 [`IconArrowRightLine`](/docs/foundation/iconography/monochrome?icon=icon_arrow_right_line)으로 대체돼요. * 이전 아이콘의 `Fill` variant는 리뉴얼된 아이콘에서도 `Fill` variant로 대체돼요. * 여러 개의 이전 아이콘이 하나의 리뉴얼된 아이콘으로 대체되는 경우도 있어요. * 예를 들면, `IconHeadphoneRegular`, `IconHelpcenterRegular`, `IconHelperRegular`는 모두 [`IconHeadsetLine`](/docs/foundation/iconography/monochrome?icon=icon_headset_line)으로 대체돼요. file: ./content/react/iconography/library.mdx # Library 리액트 아이콘 패키지는 아이콘을 사용할 때 필요한 컴포넌트를 제공합니다. ## Overview [Iconography Library](/docs/foundation/iconography/library) ## Installation ```bash npm install @karrotmarket/react-monochrome-icon @karrotmarket/react-multicolor-icon ``` ```bash pnpm add @karrotmarket/react-monochrome-icon @karrotmarket/react-multicolor-icon ``` ```bash yarn add @karrotmarket/react-monochrome-icon @karrotmarket/react-multicolor-icon ``` ```bash bun add @karrotmarket/react-monochrome-icon @karrotmarket/react-multicolor-icon ``` ## Package * [@karrotmarket/react-monochrome-icon](https://github.com/daangn/seed-icon-v3/pkgs/npm/react-monochrome-icon) * [@karrotmarket/react-multicolor-icon](https://github.com/daangn/seed-icon-v3/pkgs/npm/react-multicolor-icon) file: ./content/react/components/(layout)/box.mdx # Box Box 컴포넌트는 가장 기초적인 레이아웃 컴포넌트입니다. 디자인 토큰을 JSX에서 사용할 수 있도록 도와줍니다. ```tsx import { Box } from "@seed-design/react"; export default function BoxPreview() { return ( Box Example ); } ``` ## Usage ```tsx import { Box } from "@seed-design/react"; ``` ```tsx ``` ## Props ", "default": undefined }, background: { "type": "ScopedColorBg | ScopedColorPalette | (string & {})", "default": undefined }, bg: { "type": "ScopedColorBg | ScopedColorPalette | (string & {})", "default": undefined, description: <>

{"Shorthand for "}{"background"}{"."}

}, color: { "type": "ScopedColorPalette | (string & {}) | ScopedColorFg", "default": undefined }, borderColor: { "type": "ScopedColorPalette | (string & {}) | ScopedColorStroke", "default": undefined }, borderWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderTopWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderRightWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderBottomWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderLeftWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderTopLeftRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderTopRightRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderBottomRightRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderBottomLeftRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, width: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, minWidth: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, maxWidth: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, height: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, minHeight: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, maxHeight: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, top: { "type": "0 | (string & {})", "default": undefined }, left: { "type": "0 | (string & {})", "default": undefined }, right: { "type": "0 | (string & {})", "default": undefined }, bottom: { "type": "0 | (string & {})", "default": undefined }, padding: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, p: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"padding"}{"."}

}, paddingX: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, px: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingX"}{"."}

}, paddingY: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, py: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingY"}{"."}

}, paddingTop: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pt: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingTop"}{"."}

}, paddingRight: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pr: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingRight"}{"."}

}, paddingBottom: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pb: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingBottom"}{"."}

}, paddingLeft: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pl: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingLeft"}{"."}

}, display: { "type": "\"block\" | \"flex\" | \"inline-flex\" | \"inline\" | \"inline-block\" | \"none\" | \"inlineFlex\" | \"inlineBlock\"", "default": undefined }, position: { "type": "\"relative\" | \"absolute\" | \"fixed\" | \"sticky\"", "default": undefined }, overflowX: { "type": "\"hidden\" | \"visible\" | \"scroll\" | \"auto\"", "default": undefined }, overflowY: { "type": "\"hidden\" | \"visible\" | \"scroll\" | \"auto\"", "default": undefined }, flexGrow: { "type": "0 | 1 | (number & {})", "default": undefined }, flexShrink: { "type": "0 | (number & {})", "default": undefined }, flexDirection: { "type": "\"row\" | \"column\" | \"row-reverse\" | \"column-reverse\" | \"rowReverse\" | \"columnReverse\"", "default": undefined }, flexWrap: { "type": "\"wrap\" | \"wrap-reverse\" | \"nowrap\"", "default": undefined }, justifyContent: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"space-between\" | \"space-around\" | \"flexStart\" | \"flexEnd\" | \"spaceBetween\" | \"spaceAround\"", "default": undefined }, alignItems: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, alignContent: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, alignSelf: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, gap: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined } }} /> file: ./content/react/components/(layout)/columns.mdx # Columns (Deprecated) 여러 열로 구성된 레이아웃을 구성합니다. 디자인 토큰을 JSX에서 사용할 수 있도록 도와줍니다. (Deprecated) ```tsx import { Column, Columns } from "@seed-design/react"; /** * @deprecated use `HStack` instead. */ export default function ColumnsPreview() { return ( 1 Content Width 2 ); } ``` ## Deprecated `Columns` 컴포넌트는 더 이상 사용되지 않습니다. 대신 `HStack`을 사용하세요. ## Usage ```tsx import { Columns, Column } from "@seed-design/react"; ``` ```tsx ``` ## Props ### `Columns` ", "default": undefined }, background: { "type": "ScopedColorPalette | (string & {}) | ScopedColorBg", "default": undefined }, bg: { "type": "ScopedColorPalette | (string & {}) | ScopedColorBg", "default": undefined, description: <>

{"Shorthand for "}{"background"}{"."}

}, borderColor: { "type": "ScopedColorPalette | (string & {}) | ScopedColorStroke", "default": undefined }, borderWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderTopWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderRightWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderBottomWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderLeftWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderTopLeftRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderTopRightRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderBottomRightRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderBottomLeftRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, width: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, minWidth: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, maxWidth: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, height: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, minHeight: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, maxHeight: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, top: { "type": "0 | (string & {})", "default": undefined }, left: { "type": "0 | (string & {})", "default": undefined }, right: { "type": "0 | (string & {})", "default": undefined }, bottom: { "type": "0 | (string & {})", "default": undefined }, padding: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, p: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"padding"}{"."}

}, paddingX: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, px: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingX"}{"."}

}, paddingY: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, py: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingY"}{"."}

}, paddingTop: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pt: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingTop"}{"."}

}, paddingRight: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pr: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingRight"}{"."}

}, paddingBottom: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pb: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingBottom"}{"."}

}, paddingLeft: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pl: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingLeft"}{"."}

}, position: { "type": "\"relative\" | \"absolute\" | \"fixed\" | \"sticky\"", "default": undefined }, overflowX: { "type": "\"hidden\" | \"visible\" | \"scroll\" | \"auto\"", "default": undefined }, overflowY: { "type": "\"hidden\" | \"visible\" | \"scroll\" | \"auto\"", "default": undefined }, flexGrow: { "type": "0 | 1 | (number & {})", "default": undefined }, flexShrink: { "type": "0 | (number & {})", "default": undefined }, flexDirection: { "type": "\"row\" | \"column\" | \"row-reverse\" | \"column-reverse\" | \"rowReverse\" | \"columnReverse\"", "default": undefined }, flexWrap: { "type": "\"wrap\" | \"wrap-reverse\" | \"nowrap\"", "default": undefined }, justifyContent: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"space-between\" | \"space-around\" | \"flexStart\" | \"flexEnd\" | \"spaceBetween\" | \"spaceAround\"", "default": undefined }, alignItems: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, alignContent: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, alignSelf: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, gap: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined } }} /> ### `Column` ", "default": undefined }, background: { "type": "(string & {}) | ScopedColorPalette | ScopedColorBg", "default": undefined }, bg: { "type": "(string & {}) | ScopedColorPalette | ScopedColorBg", "default": undefined, description: <>

{"Shorthand for "}{"background"}{"."}

}, borderColor: { "type": "(string & {}) | ScopedColorPalette | ScopedColorStroke", "default": undefined }, borderWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderTopWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderRightWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderBottomWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderLeftWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderRadius: { "type": "0 | \"full\" | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\"", "default": undefined }, borderTopLeftRadius: { "type": "0 | \"full\" | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\"", "default": undefined }, borderTopRightRadius: { "type": "0 | \"full\" | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\"", "default": undefined }, borderBottomRightRadius: { "type": "0 | \"full\" | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\"", "default": undefined }, borderBottomLeftRadius: { "type": "0 | \"full\" | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\"", "default": undefined }, minWidth: { "type": "Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | \"full\" | (string & {})", "default": undefined }, maxWidth: { "type": "Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | \"full\" | (string & {})", "default": undefined }, height: { "type": "Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | \"full\" | (string & {})", "default": undefined }, minHeight: { "type": "Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | \"full\" | (string & {})", "default": undefined }, maxHeight: { "type": "Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | \"full\" | (string & {})", "default": undefined }, top: { "type": "0 | (string & {})", "default": undefined }, left: { "type": "0 | (string & {})", "default": undefined }, right: { "type": "0 | (string & {})", "default": undefined }, bottom: { "type": "0 | (string & {})", "default": undefined }, padding: { "type": "0 | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | (string & {})", "default": undefined }, p: { "type": "0 | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | (string & {})", "default": undefined, description: <>

{"Shorthand for "}{"padding"}{"."}

}, paddingX: { "type": "0 | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | (string & {})", "default": undefined }, px: { "type": "0 | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | (string & {})", "default": undefined, description: <>

{"Shorthand for "}{"paddingX"}{"."}

}, paddingY: { "type": "0 | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | (string & {})", "default": undefined }, py: { "type": "0 | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | (string & {})", "default": undefined, description: <>

{"Shorthand for "}{"paddingY"}{"."}

}, paddingTop: { "type": "0 | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | (string & {})", "default": undefined }, pt: { "type": "0 | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | (string & {})", "default": undefined, description: <>

{"Shorthand for "}{"paddingTop"}{"."}

}, paddingRight: { "type": "0 | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | (string & {})", "default": undefined }, pr: { "type": "0 | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | (string & {})", "default": undefined, description: <>

{"Shorthand for "}{"paddingRight"}{"."}

}, paddingBottom: { "type": "0 | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | (string & {})", "default": undefined }, pb: { "type": "0 | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | (string & {})", "default": undefined, description: <>

{"Shorthand for "}{"paddingBottom"}{"."}

}, paddingLeft: { "type": "0 | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | (string & {})", "default": undefined }, pl: { "type": "0 | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | (string & {})", "default": undefined, description: <>

{"Shorthand for "}{"paddingLeft"}{"."}

}, position: { "type": "\"relative\" | \"absolute\" | \"fixed\" | \"sticky\"", "default": undefined }, overflowX: { "type": "\"hidden\" | \"visible\" | \"scroll\" | \"auto\"", "default": undefined }, overflowY: { "type": "\"hidden\" | \"visible\" | \"scroll\" | \"auto\"", "default": undefined }, flexGrow: { "type": "0 | 1 | (number & {})", "default": undefined }, flexShrink: { "type": "0 | (number & {})", "default": undefined }, flexWrap: { "type": "\"wrap\" | \"wrap-reverse\" | \"nowrap\"", "default": undefined }, justifyContent: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"space-between\" | \"space-around\" | \"flexStart\" | \"flexEnd\" | \"spaceBetween\" | \"spaceAround\"", "default": undefined }, alignItems: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, alignContent: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, alignSelf: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, gap: { "type": "0 | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\" | (string & {})", "default": undefined } }} /> file: ./content/react/components/(layout)/flex.mdx # Flex Flex 컴포넌트는 flexbox를 사용하며 디자인 토큰을 JSX에서 사용할 수 있도록 도와줍니다. ```tsx import { Flex } from "@seed-design/react"; export default function FlexPreview() { return ( 1 2 3 4 5 ); } ``` ## Props

{"Shorthand for "}{"flexDirection"}{"."}

}, wrap: { "type": "true | \"wrap\" | \"wrap-reverse\" | \"nowrap\"", "default": undefined, description: <>

{"Shorthand for "}{"flexWrap"}{".\nIf true, flex-wrap will be set to "}{"wrap"}{"."}

}, align: { "type": "\"flex-start\" | \"flex-end\" | \"center\" | \"stretch\" | \"flexStart\" | \"flexEnd\"", "default": undefined, description: <>

{"Shorthand for "}{"alignItems"}{"."}

}, justify: { "type": "\"flex-start\" | \"flex-end\" | \"center\" | \"flexStart\" | \"flexEnd\" | \"space-between\" | \"space-around\" | \"spaceBetween\" | \"spaceAround\"", "default": undefined, description: <>

{"Shorthand for "}{"justifyContent"}{"."}

}, grow: { "type": "true | 0 | 1 | (number & {})", "default": undefined, description: <>

{"Shorthand for "}{"flexGrow"}{".\nIf true, flex-grow will be set to "}{"1"}{"."}

}, shrink: { "type": "0 | (number & {})", "default": undefined, description: <>

{"Shorthand for "}{"flexShrink"}{"."}

}, color: { "type": "ScopedColorFg | ScopedColorPalette | (string & {})", "default": undefined }, as: { "type": "ElementType", "default": undefined }, background: { "type": "ScopedColorPalette | (string & {}) | ScopedColorBg", "default": undefined }, bg: { "type": "ScopedColorPalette | (string & {}) | ScopedColorBg", "default": undefined, description: <>

{"Shorthand for "}{"background"}{"."}

}, borderColor: { "type": "ScopedColorPalette | (string & {}) | ScopedColorStroke", "default": undefined }, borderWidth: { "type": "0 | 1 | (string & {})", "default": undefined }, borderTopWidth: { "type": "0 | 1 | (string & {})", "default": undefined }, borderRightWidth: { "type": "0 | 1 | (string & {})", "default": undefined }, borderBottomWidth: { "type": "0 | 1 | (string & {})", "default": undefined }, borderLeftWidth: { "type": "0 | 1 | (string & {})", "default": undefined }, borderRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderTopLeftRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderTopRightRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderBottomRightRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderBottomLeftRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, width: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, minWidth: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, maxWidth: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, height: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, minHeight: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, maxHeight: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, top: { "type": "0 | (string & {})", "default": undefined }, left: { "type": "0 | (string & {})", "default": undefined }, right: { "type": "0 | (string & {})", "default": undefined }, bottom: { "type": "0 | (string & {})", "default": undefined }, padding: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, p: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"padding"}{"."}

}, paddingX: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, px: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingX"}{"."}

}, paddingY: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, py: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingY"}{"."}

}, paddingTop: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pt: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingTop"}{"."}

}, paddingRight: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pr: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingRight"}{"."}

}, paddingBottom: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pb: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingBottom"}{"."}

}, paddingLeft: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pl: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingLeft"}{"."}

}, position: { "type": "\"relative\" | \"absolute\" | \"fixed\" | \"sticky\"", "default": undefined }, overflowX: { "type": "\"hidden\" | \"visible\" | \"scroll\" | \"auto\"", "default": undefined }, overflowY: { "type": "\"hidden\" | \"visible\" | \"scroll\" | \"auto\"", "default": undefined }, flexGrow: { "type": "0 | 1 | (number & {})", "default": undefined }, flexShrink: { "type": "0 | (number & {})", "default": undefined }, flexDirection: { "type": "\"row\" | \"column\" | \"row-reverse\" | \"column-reverse\" | \"rowReverse\" | \"columnReverse\"", "default": undefined }, flexWrap: { "type": "\"wrap\" | \"wrap-reverse\" | \"nowrap\"", "default": undefined }, justifyContent: { "type": "\"flex-start\" | \"flex-end\" | \"center\" | \"flexStart\" | \"flexEnd\" | \"space-between\" | \"space-around\" | \"spaceBetween\" | \"spaceAround\"", "default": undefined }, alignItems: { "type": "\"flex-start\" | \"flex-end\" | \"center\" | \"stretch\" | \"flexStart\" | \"flexEnd\"", "default": undefined }, alignContent: { "type": "\"flex-start\" | \"flex-end\" | \"center\" | \"stretch\" | \"flexStart\" | \"flexEnd\"", "default": undefined }, alignSelf: { "type": "\"flex-start\" | \"flex-end\" | \"center\" | \"stretch\" | \"flexStart\" | \"flexEnd\"", "default": undefined }, gap: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined } }} /> file: ./content/react/components/(layout)/h-stack.mdx # HStack 가로로 쌓이는 레이아웃을 구성합니다. 디자인 토큰을 JSX에서 사용할 수 있도록 도와줍니다. ```tsx import { Box, HStack } from "@seed-design/react"; export default function HStackPreview() { return ( 1 2 3 ); } ``` ## Usage ```tsx import { HStack } from "@seed-design/react"; ``` ```tsx ``` ## Props ", "default": undefined }, background: { "type": "ScopedColorPalette | (string & {}) | ScopedColorBg", "default": undefined }, bg: { "type": "ScopedColorPalette | (string & {}) | ScopedColorBg", "default": undefined, description: <>

{"Shorthand for "}{"background"}{"."}

}, borderColor: { "type": "ScopedColorPalette | (string & {}) | ScopedColorStroke", "default": undefined }, borderWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderTopWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderRightWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderBottomWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderLeftWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderTopLeftRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderTopRightRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderBottomRightRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderBottomLeftRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, width: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, minWidth: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, maxWidth: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, height: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, minHeight: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, maxHeight: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, top: { "type": "0 | (string & {})", "default": undefined }, left: { "type": "0 | (string & {})", "default": undefined }, right: { "type": "0 | (string & {})", "default": undefined }, bottom: { "type": "0 | (string & {})", "default": undefined }, padding: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, p: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"padding"}{"."}

}, paddingX: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, px: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingX"}{"."}

}, paddingY: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, py: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingY"}{"."}

}, paddingTop: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pt: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingTop"}{"."}

}, paddingRight: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pr: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingRight"}{"."}

}, paddingBottom: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pb: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingBottom"}{"."}

}, paddingLeft: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pl: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingLeft"}{"."}

}, position: { "type": "\"relative\" | \"absolute\" | \"fixed\" | \"sticky\"", "default": undefined }, overflowX: { "type": "\"hidden\" | \"visible\" | \"scroll\" | \"auto\"", "default": undefined }, overflowY: { "type": "\"hidden\" | \"visible\" | \"scroll\" | \"auto\"", "default": undefined }, flexGrow: { "type": "0 | 1 | (number & {})", "default": undefined }, flexShrink: { "type": "0 | (number & {})", "default": undefined }, flexWrap: { "type": "\"wrap\" | \"wrap-reverse\" | \"nowrap\"", "default": undefined }, justifyContent: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"space-between\" | \"space-around\" | \"flexStart\" | \"flexEnd\" | \"spaceBetween\" | \"spaceAround\"", "default": undefined }, alignItems: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, alignContent: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, alignSelf: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, gap: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, direction: { "type": "\"row\" | \"column\" | \"row-reverse\" | \"column-reverse\" | \"rowReverse\" | \"columnReverse\"", "default": undefined, description: <>

{"Shorthand for "}{"flexDirection"}{"."}

}, wrap: { "type": "true | \"wrap\" | \"wrap-reverse\" | \"nowrap\"", "default": undefined, description: <>

{"Shorthand for "}{"flexWrap"}{".\nIf true, flex-wrap will be set to "}{"wrap"}{"."}

}, align: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined, description: <>

{"Shorthand for "}{"alignItems"}{"."}

}, justify: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"space-between\" | \"space-around\" | \"flexStart\" | \"flexEnd\" | \"spaceBetween\" | \"spaceAround\"", "default": undefined, description: <>

{"Shorthand for "}{"justifyContent"}{"."}

}, grow: { "type": "true | 0 | 1 | (number & {})", "default": undefined, description: <>

{"Shorthand for "}{"flexGrow"}{".\nIf true, flex-grow will be set to "}{"1"}{"."}

}, shrink: { "type": "0 | (number & {})", "default": undefined, description: <>

{"Shorthand for "}{"flexShrink"}{"."}

} }} /> file: ./content/react/components/(layout)/inline.mdx # Inline (Deprecated) 인라인 레이아웃을 구성합니다. 디자인 토큰을 JSX에서 사용할 수 있도록 도와줍니다. (Deprecated) ```tsx import { Box, Inline } from "@seed-design/react"; /** * @deprecated Use `HStack` instead. */ export default function InlinePreview() { return ( 1 2 3 ); } ``` ## Deprecated `Inline` 컴포넌트는 더 이상 사용되지 않습니다. 대신 `HStack`과 `wrap` prop을 사용하세요. ## Usage ```tsx import { Inline } from "@seed-design/react"; ``` ```tsx ``` ## Props ", "default": undefined }, background: { "type": "ScopedColorPalette | (string & {}) | ScopedColorBg", "default": undefined }, bg: { "type": "ScopedColorPalette | (string & {}) | ScopedColorBg", "default": undefined, description: <>

{"Shorthand for "}{"background"}{"."}

}, borderColor: { "type": "ScopedColorPalette | (string & {}) | ScopedColorStroke", "default": undefined }, borderWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderTopWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderRightWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderBottomWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderLeftWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderTopLeftRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderTopRightRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderBottomRightRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderBottomLeftRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, width: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, minWidth: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, maxWidth: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, height: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, minHeight: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, maxHeight: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, top: { "type": "0 | (string & {})", "default": undefined }, left: { "type": "0 | (string & {})", "default": undefined }, right: { "type": "0 | (string & {})", "default": undefined }, bottom: { "type": "0 | (string & {})", "default": undefined }, padding: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, p: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"padding"}{"."}

}, paddingX: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, px: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingX"}{"."}

}, paddingY: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, py: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingY"}{"."}

}, paddingTop: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pt: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingTop"}{"."}

}, paddingRight: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pr: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingRight"}{"."}

}, paddingBottom: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pb: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingBottom"}{"."}

}, paddingLeft: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pl: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingLeft"}{"."}

}, position: { "type": "\"relative\" | \"absolute\" | \"fixed\" | \"sticky\"", "default": undefined }, overflowX: { "type": "\"hidden\" | \"visible\" | \"scroll\" | \"auto\"", "default": undefined }, overflowY: { "type": "\"hidden\" | \"visible\" | \"scroll\" | \"auto\"", "default": undefined }, flexGrow: { "type": "0 | 1 | (number & {})", "default": undefined }, flexShrink: { "type": "0 | (number & {})", "default": undefined }, flexDirection: { "type": "\"row\" | \"column\" | \"row-reverse\" | \"column-reverse\" | \"rowReverse\" | \"columnReverse\"", "default": undefined }, justifyContent: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"space-between\" | \"space-around\" | \"flexStart\" | \"flexEnd\" | \"spaceBetween\" | \"spaceAround\"", "default": undefined }, alignItems: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, alignContent: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, alignSelf: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, gap: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined } }} /> file: ./content/react/components/(layout)/stack.mdx # Stack (Deprecated) 세로로 쌓이는 레이아웃을 구성합니다. 디자인 토큰을 JSX에서 사용할 수 있도록 도와줍니다. (Deprecated) ```tsx import { Box, Stack } from "@seed-design/react"; /** * @deprecated Use `VStack` instead. */ export default function StackPreview() { return ( 1 2 3 ); } ``` ## Deprecated `Stack` 컴포넌트는 더 이상 사용되지 않습니다. 대신 `VStack`을 사용하세요. ## Usage ```tsx import { Stack } from "@seed-design/react"; ``` ```tsx ``` ## Props ", "default": undefined }, background: { "type": "ScopedColorPalette | (string & {}) | ScopedColorBg", "default": undefined }, bg: { "type": "ScopedColorPalette | (string & {}) | ScopedColorBg", "default": undefined, description: <>

{"Shorthand for "}{"background"}{"."}

}, borderColor: { "type": "ScopedColorPalette | (string & {}) | ScopedColorStroke", "default": undefined }, borderWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderTopWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderRightWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderBottomWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderLeftWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderTopLeftRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderTopRightRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderBottomRightRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderBottomLeftRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, width: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, minWidth: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, maxWidth: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, height: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, minHeight: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, maxHeight: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, top: { "type": "0 | (string & {})", "default": undefined }, left: { "type": "0 | (string & {})", "default": undefined }, right: { "type": "0 | (string & {})", "default": undefined }, bottom: { "type": "0 | (string & {})", "default": undefined }, padding: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, p: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"padding"}{"."}

}, paddingX: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, px: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingX"}{"."}

}, paddingY: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, py: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingY"}{"."}

}, paddingTop: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pt: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingTop"}{"."}

}, paddingRight: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pr: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingRight"}{"."}

}, paddingBottom: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pb: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingBottom"}{"."}

}, paddingLeft: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pl: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingLeft"}{"."}

}, position: { "type": "\"relative\" | \"absolute\" | \"fixed\" | \"sticky\"", "default": undefined }, overflowX: { "type": "\"hidden\" | \"visible\" | \"scroll\" | \"auto\"", "default": undefined }, overflowY: { "type": "\"hidden\" | \"visible\" | \"scroll\" | \"auto\"", "default": undefined }, flexGrow: { "type": "0 | 1 | (number & {})", "default": undefined }, flexShrink: { "type": "0 | (number & {})", "default": undefined }, flexWrap: { "type": "\"wrap\" | \"wrap-reverse\" | \"nowrap\"", "default": undefined }, justifyContent: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"space-between\" | \"space-around\" | \"flexStart\" | \"flexEnd\" | \"spaceBetween\" | \"spaceAround\"", "default": undefined }, alignItems: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, alignContent: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, alignSelf: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, gap: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, direction: { "type": "\"row\" | \"column\" | \"row-reverse\" | \"column-reverse\" | \"rowReverse\" | \"columnReverse\"", "default": undefined, description: <>

{"Shorthand for "}{"flexDirection"}{"."}

}, wrap: { "type": "true | \"wrap\" | \"wrap-reverse\" | \"nowrap\"", "default": undefined, description: <>

{"Shorthand for "}{"flexWrap"}{".\nIf true, flex-wrap will be set to "}{"wrap"}{"."}

}, align: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined, description: <>

{"Shorthand for "}{"alignItems"}{"."}

}, justify: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"space-between\" | \"space-around\" | \"flexStart\" | \"flexEnd\" | \"spaceBetween\" | \"spaceAround\"", "default": undefined, description: <>

{"Shorthand for "}{"justifyContent"}{"."}

}, grow: { "type": "true | 0 | 1 | (number & {})", "default": undefined, description: <>

{"Shorthand for "}{"flexGrow"}{".\nIf true, flex-grow will be set to "}{"1"}{"."}

}, shrink: { "type": "0 | (number & {})", "default": undefined, description: <>

{"Shorthand for "}{"flexShrink"}{"."}

} }} /> file: ./content/react/components/(layout)/v-stack.mdx # VStack 세로로 쌓이는 레이아웃을 구성합니다. 디자인 토큰을 JSX에서 사용할 수 있도록 도와줍니다. ```tsx import { Box, VStack } from "@seed-design/react"; export default function VStackPreview() { return ( 1 2 3 ); } ``` ## Usage ```tsx import { VStack } from "@seed-design/react"; ``` ```tsx ``` ## Props ", "default": undefined }, background: { "type": "ScopedColorPalette | (string & {}) | ScopedColorBg", "default": undefined }, bg: { "type": "ScopedColorPalette | (string & {}) | ScopedColorBg", "default": undefined, description: <>

{"Shorthand for "}{"background"}{"."}

}, borderColor: { "type": "ScopedColorPalette | (string & {}) | ScopedColorStroke", "default": undefined }, borderWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderTopWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderRightWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderBottomWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderLeftWidth: { "type": "0 | (string & {}) | 1", "default": undefined }, borderRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderTopLeftRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderTopRightRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderBottomRightRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, borderBottomLeftRadius: { "type": "0 | (string & {}) | \"r0_5\" | \"r1\" | \"r1_5\" | \"r2\" | \"r2_5\" | \"r3\" | \"r3_5\" | \"r4\" | \"r5\" | \"r6\" | \"full\"", "default": undefined }, width: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, minWidth: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, maxWidth: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, height: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, minHeight: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, maxHeight: { "type": "(string & {}) | \"full\" | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, top: { "type": "0 | (string & {})", "default": undefined }, left: { "type": "0 | (string & {})", "default": undefined }, right: { "type": "0 | (string & {})", "default": undefined }, bottom: { "type": "0 | (string & {})", "default": undefined }, padding: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, p: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"padding"}{"."}

}, paddingX: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, px: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingX"}{"."}

}, paddingY: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, py: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingY"}{"."}

}, paddingTop: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pt: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingTop"}{"."}

}, paddingRight: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pr: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingRight"}{"."}

}, paddingBottom: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pb: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingBottom"}{"."}

}, paddingLeft: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, pl: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined, description: <>

{"Shorthand for "}{"paddingLeft"}{"."}

}, position: { "type": "\"relative\" | \"absolute\" | \"fixed\" | \"sticky\"", "default": undefined }, overflowX: { "type": "\"hidden\" | \"visible\" | \"scroll\" | \"auto\"", "default": undefined }, overflowY: { "type": "\"hidden\" | \"visible\" | \"scroll\" | \"auto\"", "default": undefined }, flexGrow: { "type": "0 | 1 | (number & {})", "default": undefined }, flexShrink: { "type": "0 | (number & {})", "default": undefined }, flexWrap: { "type": "\"wrap\" | \"wrap-reverse\" | \"nowrap\"", "default": undefined }, justifyContent: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"space-between\" | \"space-around\" | \"flexStart\" | \"flexEnd\" | \"spaceBetween\" | \"spaceAround\"", "default": undefined }, alignItems: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, alignContent: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, alignSelf: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined }, gap: { "type": "0 | (string & {}) | Dimension | \"spacingX.betweenChips\" | \"spacingX.globalGutter\" | \"spacingY.componentDefault\" | \"spacingY.navToTitle\" | \"spacingY.screenBottom\" | \"spacingY.betweenText\"", "default": undefined }, direction: { "type": "\"row\" | \"column\" | \"row-reverse\" | \"column-reverse\" | \"rowReverse\" | \"columnReverse\"", "default": undefined, description: <>

{"Shorthand for "}{"flexDirection"}{"."}

}, wrap: { "type": "true | \"wrap\" | \"wrap-reverse\" | \"nowrap\"", "default": undefined, description: <>

{"Shorthand for "}{"flexWrap"}{".\nIf true, flex-wrap will be set to "}{"wrap"}{"."}

}, align: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"flexStart\" | \"flexEnd\" | \"stretch\"", "default": undefined, description: <>

{"Shorthand for "}{"alignItems"}{"."}

}, justify: { "type": "\"center\" | \"flex-start\" | \"flex-end\" | \"space-between\" | \"space-around\" | \"flexStart\" | \"flexEnd\" | \"spaceBetween\" | \"spaceAround\"", "default": undefined, description: <>

{"Shorthand for "}{"justifyContent"}{"."}

}, grow: { "type": "true | 0 | 1 | (number & {})", "default": undefined, description: <>

{"Shorthand for "}{"flexGrow"}{".\nIf true, flex-grow will be set to "}{"1"}{"."}

}, shrink: { "type": "0 | (number & {})", "default": undefined, description: <>

{"Shorthand for "}{"flexShrink"}{"."}

} }} /> file: ./content/react/components/(select-box)/check-select-box.mdx # Check Select Box 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { VStack } from "@seed-design/react"; import { CheckSelectBox, CheckSelectBoxGroup } from "seed-design/ui/select-box"; export default function CheckSelectBoxPreview() { return ( ); } ``` ## Installation ## Props ### `CheckSelectBox` ", "default": undefined }, rootRef: { "type": "Ref", "default": undefined }, disabled: { "type": "boolean", "default": undefined }, invalid: { "type": "boolean", "default": undefined }, required: { "type": "boolean", "default": undefined }, checked: { "type": "boolean", "default": undefined }, defaultChecked: { "type": "boolean", "default": undefined }, onCheckedChange: { "type": "((checked: boolean) => void)", "default": undefined }, indeterminate: { "type": "boolean", "default": undefined }, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

} }} /> ## Examples ### React Hook Form ```tsx import { HStack, VStack } from "@seed-design/react"; import { useCallback, type FormEvent } from "react"; import { useController, useForm } from "react-hook-form"; import { ActionButton } from "seed-design/ui/action-button"; import { CheckSelectBox, CheckSelectBoxGroup } from "seed-design/ui/select-box"; const POSSIBLE_FRUIT_VALUES = ["apple", "melon", "mango"] as const; type FormValues = Record<(typeof POSSIBLE_FRUIT_VALUES)[number], boolean>; export default function CheckSelectBoxReactHookForm() { const { handleSubmit, reset, setValue, control } = useForm({ defaultValues: { apple: false, melon: true, mango: false, }, }); const onValid = useCallback((data: FormValues) => { window.alert(JSON.stringify(data, null, 2)); }, []); const onReset = useCallback( (event: FormEvent) => { event.preventDefault(); reset(); }, [reset], ); return ( {POSSIBLE_FRUIT_VALUES.map((name) => { const { field: { value, ...restProps }, fieldState: { invalid }, } = useController({ name, control }); return ( ); })} 초기화 setValue("mango", true)}> mango 선택 제출 ); } ``` file: ./content/react/components/(select-box)/radio-select-box.mdx # Radio Select Box 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { VStack } from "@seed-design/react"; import { RadioSelectBoxItem, RadioSelectBoxRoot } from "seed-design/ui/select-box"; export default function RadioSelectBoxPreview() { return ( ); } ``` ## Installation ## Props ### `RadioSelectBoxRoot` void)", "default": undefined }, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

} }} /> ### `RadioSelectBoxItem` ", "default": undefined }, rootRef: { "type": "Ref", "default": undefined }, value: { "type": "string", "default": undefined }, disabled: { "type": "boolean", "default": undefined }, invalid: { "type": "boolean", "default": undefined }, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

} }} /> ## Examples ### React Hook Form ```tsx import { HStack, VStack } from "@seed-design/react"; import { useCallback, type FormEvent } from "react"; import { useController, useForm } from "react-hook-form"; import { ActionButton } from "seed-design/ui/action-button"; import { RadioSelectBoxItem, RadioSelectBoxRoot } from "seed-design/ui/select-box"; const POSSIBLE_FRUIT_VALUES = ["apple", "melon", "mango"] as const; interface FormValues { fruit: (typeof POSSIBLE_FRUIT_VALUES)[number]; } export default function RadioSelectBoxReactHookForm() { const { handleSubmit, reset, setValue, control } = useForm({ defaultValues: { fruit: "melon", }, }); const { field } = useController({ name: "fruit", control }); const onValid = useCallback((data: FormValues) => { window.alert(JSON.stringify(data, null, 2)); }, []); const onReset = useCallback( (event: FormEvent) => { event.preventDefault(); reset(); }, [reset], ); return ( {POSSIBLE_FRUIT_VALUES.map((value) => ( ))} 초기화 setValue("fruit", "mango")} > mango 선택 제출 ); } ``` file: ./content/react/components/(tabs)/chip-tabs.mdx # Chip Tabs 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import * as React from "react"; import { ChipTabsList, ChipTabsRoot, ChipTabsTrigger } from "seed-design/ui/chip-tabs"; export default function ChipTabsPreview() { const [value, setValue] = React.useState("1"); return ( <> setValue(value)} > 라벨1 라벨2 라벨3 {value === "1" &&
content 1
} {value === "2" &&
content 2
} {value === "3" &&
content 3
} ); } ```
## Installation ## Props ### `ChipTabsRoot` void)", "default": undefined }, lazyMount: { "type": "boolean", "default": "false", description: <>

{"If "}{"true"}{", the component will be mounted lazily."}

}, unmountOnExit: { "type": "boolean", "default": "false", description: <>

{"If "}{"true"}{", the component will be unmounted when it's not selected."}

}, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

} }} /> ### `ChipTabsList`

{"Whether the element should be rendered as a child of a slot."}

} }} /> ### `ChipTabsTrigger`

{"Whether the element should be rendered as a child of a slot."}

} }} /> ### `ChipTabsCarousel` void)", "default": undefined } }} /> ### `ChipTabsContent`

{"Whether the element should be rendered as a child of a slot."}

}, value: { "type": "string", "default": undefined } }} /> ## Examples ### Neutral Solid ```tsx import * as React from "react"; import { ChipTabsList, ChipTabsRoot, ChipTabsTrigger } from "seed-design/ui/chip-tabs"; export default function ChipTabsVariantNeutralSolid() { const [value, setValue] = React.useState("1"); return ( <> setValue(value)} > 라벨1 라벨2 라벨3 {value === "1" &&
content 1
} {value === "2" &&
content 2
} {value === "3" &&
content 3
} ); } ```
### Brand Solid ```tsx import * as React from "react"; import { ChipTabsList, ChipTabsRoot, ChipTabsTrigger } from "seed-design/ui/chip-tabs"; export default function ChipTabsVariantBrandSolid() { const [value, setValue] = React.useState("1"); return ( <> setValue(value)} > 라벨1 라벨2 라벨3 {value === "1" &&
content 1
} {value === "2" &&
content 2
} {value === "3" &&
content 3
} ); } ```
### Stackflow ```tsx import * as React from "react"; import { ChipTabsList, ChipTabsRoot, ChipTabsTrigger } from "seed-design/ui/chip-tabs"; import AppScreen from "@/components/stackflow/ActivityLayout"; import type { ActivityComponentType } from "@stackflow/react/future"; declare module "@stackflow/config" { interface Register { "chip-tabs-basic": unknown; } } const ChipTabsBasicActivity: ActivityComponentType<"chip-tabs-basic"> = () => { const [value, setValue] = React.useState("1"); const commonStyle = { display: "flex", justifyContent: "center", alignItems: "center", backgroundColor: "#eeeeee", height: "100%", }; return ( setValue(value)} > 라벨1 라벨2 라벨3 {value === "1" &&
content 1
} {value === "2" &&
content 2
} {value === "3" &&
content 3
}
); }; export default ChipTabsBasicActivity; ```
file: ./content/react/components/(tabs)/tabs.mdx # Tabs 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { TabsContent, TabsList, TabsRoot, TabsTrigger } from "seed-design/ui/tabs"; export default function TabsPreview() { return (
라벨1 라벨2 라벨3 Content 1 Content 2 Content 3
); } const Content = (props: React.PropsWithChildren) => { return (
{props.children}
); }; ```
## Installation ## Props ### TabsRoot void)", "default": undefined }, lazyMount: { "type": "boolean", "default": "false", description: <>

{"If "}{"true"}{", the component will be mounted lazily."}

}, unmountOnExit: { "type": "boolean", "default": "false", description: <>

{"If "}{"true"}{", the component will be unmounted when it's not selected."}

}, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

} }} /> ### TabsList

{"Whether the element should be rendered as a child of a slot."}

} }} /> ### TabsTrigger ### TabsCarousel void)", "default": undefined } }} /> ### TabsContent

{"Whether the element should be rendered as a child of a slot."}

}, value: { "type": "string", "default": undefined } }} /> ## Examples ### Layout Fill (Default) ```tsx import { TabsContent, TabsList, TabsRoot, TabsTrigger } from "seed-design/ui/tabs"; export default function TabsLayoutFill() { return (
라벨1 라벨2 라벨3 Content 1 Content 2 Content 3
); } const Content = (props: React.PropsWithChildren) => { return (
{props.children}
); }; ```
### Layout Hug ```tsx import { TabsContent, TabsList, TabsRoot, TabsTrigger } from "seed-design/ui/tabs"; export default function TabsLayoutHug() { return (
라벨1 라벨2 라벨3 Content 1 Content 2 Content 3
); } const Content = (props: React.PropsWithChildren) => { return (
{props.children}
); }; ```
### Size Medium ```tsx import { TabsContent, TabsList, TabsRoot, TabsTrigger } from "seed-design/ui/tabs"; export default function TabsSizeMedium() { return (
라벨1 라벨2 라벨3 Content 1 Content 2 Content 3
); } const Content = (props: React.PropsWithChildren) => { return (
{props.children}
); }; ```
### Size Small (Default) ```tsx import { TabsContent, TabsList, TabsRoot, TabsTrigger } from "seed-design/ui/tabs"; export default function TabsSizeSmall() { return (
라벨1 라벨2 라벨3 Content 1 Content 2 Content 3
); } const Content = (props: React.PropsWithChildren) => { return (
{props.children}
); }; ```
### Swipeable ```tsx import { TabsRoot, TabsList, TabsTrigger, TabsCarousel, TabsContent } from "seed-design/ui/tabs"; export default function TabsSwipeable() { return (
라벨1 라벨2 라벨3 Content 1 Content 2 Content 3
); } const Content = (props: React.PropsWithChildren) => { return (
{props.children}
); }; ```
### Disabled ```tsx import { TabsContent, TabsList, TabsRoot, TabsTrigger } from "seed-design/ui/tabs"; export default function TabsDisabled() { return (
라벨1 라벨2 라벨3 Content 1 Content 2 Content 3
); } const Content = (props: React.PropsWithChildren) => { return (
{props.children}
); }; ```
### Notification ```tsx import { TabsContent, TabsList, TabsRoot, TabsTrigger } from "seed-design/ui/tabs"; export default function TabsNotification() { return (
라벨1 라벨2 라벨3 Content 1 Content 2 Content 3
); } const Content = (props: React.PropsWithChildren) => { return (
{props.children}
); }; ```
### Sticky List 탭이 전체화면을 차지하고, Tabs.List가 top에 고정되어 있는 경우 사용하는 예시입니다. ```tsx import { TabsContent, TabsList, TabsRoot, TabsTrigger } from "seed-design/ui/tabs"; export default function TabsStickyList() { return ( // 600은 화면 높이라고 가정합니다.
라벨1 라벨2 라벨3 Content 1 Content 2 Content 3
); } const Content = (props: React.PropsWithChildren<{ height: string }>) => { const { height, children } = props; return (
{children}
); }; ```
### Standalone TabContent를 사용하지 않고, 컨텐츠 영역을 온전히 소유하고 싶을 때 사용하는 예시입니다. 탭에서 제공하는 Swipe 기능을 사용할 수 없습니다. ```tsx import { useState } from "react"; import { TabsList, TabsRoot, TabsTrigger } from "seed-design/ui/tabs"; export default function TabsStandalone() { const [activeTab, setActiveTab] = useState("1"); return (
라벨1 라벨2 라벨3 {activeTab === "1" && (
Content 1
)} {activeTab === "2" && (
Content 2
)} {activeTab === "3" && (
Content 3
)}
); } const Content = (props: React.PropsWithChildren) => { return (
{props.children}
); }; ```
### Dynamic Height 각 탭의 높이가 다를 때, 아래의 컨텐츠를 탭 아래에 바로 맞추기 위해서 사용하는 예시입니다. 탭이 자주 바뀌고, 탭에 네트워크 요청이 많은 경우 캐싱을 잘 고려해주세요. ```tsx import { TabsCarousel, TabsContent, TabsList, TabsRoot, TabsTrigger } from "seed-design/ui/tabs"; export default function TabsDynamicHeight() { return (
라벨1 라벨2 라벨3 Content 1 Content 2 Content 3
아래 컨텐츠
); } const Content = (props: React.PropsWithChildren<{ height: string }>) => { const { height, children } = props; return (
{children}
); }; ```
### Scroll to Top ```tsx import { RefObject, useRef, useState } from "react"; import { TabsCarousel, TabsContent, TabsList, TabsRoot, TabsTrigger } from "seed-design/ui/tabs"; export default function TabsScrollTop() { const [currentTab, setCurrentTab] = useState("1"); const contentRefs: Record> = { "1": useRef(null), "2": useRef(null), }; const handleTriggerClick = (value: string) => { if (value === currentTab) { contentRefs[value].current?.scrollTo({ top: 0, behavior: "smooth" }); } }; return (
handleTriggerClick("1")} value="1"> 라벨1 handleTriggerClick("2")} value="2"> 라벨2 Content 1 Content 2
); } const Content = (props: React.PropsWithChildren<{ height: string }>) => { const { height, children } = props; return (
{children}
); }; ```
file: ./content/react/components/(text-field)/multiline-text-field.mdx # Multiline Text Field 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { TextField, TextFieldTextarea } from "seed-design/ui/text-field"; export default function MultilineTextFieldPreview() { return ( ); } ``` ## Installation ## Props ### `TextField` void)", "default": undefined }, maxGraphemeCount: { "type": "number", "default": undefined }, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

} }} /> ### `TextFieldTextarea`

{"If true, the textarea will automatically resize based on its content."}

}, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

} }} /> ## Examples ### State #### Enabled ```tsx import { HStack } from "@seed-design/react"; import { TextField, TextFieldTextarea } from "seed-design/ui/text-field"; export default function MultilineTextFieldEnabled() { return ( ); } ``` #### Disabled ```tsx import { HStack } from "@seed-design/react"; import { TextField, TextFieldTextarea } from "seed-design/ui/text-field"; export default function MultilineTextFieldDisabled() { return ( ); } ``` #### Read Only ```tsx import { HStack } from "@seed-design/react"; import { TextField, TextFieldTextarea } from "seed-design/ui/text-field"; export default function MultilineTextFieldReadOnly() { return ( ); } ``` ### Sizing #### Fixed Height ```tsx import { TextField, TextFieldTextarea } from "seed-design/ui/text-field"; export default function MultilineTextFieldSpecifiedHeight() { return ( ); } ``` #### Auto Height with Constraints ```tsx import { TextField, TextFieldTextarea } from "seed-design/ui/text-field"; export default function MultilineTextFieldConstraints() { return ( ); } ``` ### Customizable Parts #### Required Indicator ```tsx import { TextField, TextFieldTextarea } from "seed-design/ui/text-field"; export default function MultilineTextFieldRequired() { return ( ); } ``` #### Optional Indicator ```tsx import { TextField, TextFieldTextarea } from "seed-design/ui/text-field"; export default function MultilineTextFieldOptional() { return ( ); } ``` #### Grapheme Count ```tsx import { TextField, TextFieldTextarea } from "seed-design/ui/text-field"; export default function MultilineTextFieldGraphemeCount() { return ( ); } ``` ### Size #### XLarge ```tsx import { TextField, TextFieldTextarea } from "seed-design/ui/text-field"; export default function MultilineTextFieldXlarge() { return ( ); } ``` #### Large ```tsx import { TextField, TextFieldTextarea } from "seed-design/ui/text-field"; export default function MultilineTextFieldLarge() { return ( ); } ``` #### Medium ```tsx import { TextField, TextFieldTextarea } from "seed-design/ui/text-field"; export default function MultilineTextFieldMedium() { return ( ); } ``` ### Use Cases #### Form ```tsx import { HStack, VStack } from "@seed-design/react"; import { useCallback, useState, type FormEvent } from "react"; import { ActionButton } from "seed-design/ui/action-button"; import { TextField, TextFieldTextarea } from "seed-design/ui/text-field"; interface FormValues { bio: string; address: string; } type FieldErrors = Record; export default function MultilineTextFieldForm() { const [formValues, setFormValues] = useState({ bio: "", address: "", }); const [fieldErrors, setFieldStates] = useState({ bio: null, address: null, }); const validateForm = useCallback((): boolean => { let isValid = true; const newFieldErrors: FieldErrors = { bio: null, address: null, }; // Name validation if (!formValues.bio) { newFieldErrors.bio = "필수 입력 항목입니다"; isValid = false; } if (!formValues.address.startsWith("대한민국")) { newFieldErrors.address = "대한민국으로 시작해주세요"; isValid = false; } if (!formValues.address) { newFieldErrors.address = "필수 입력 항목입니다"; isValid = false; } setFieldStates(newFieldErrors); return isValid; }, [formValues]); const handleSubmit = useCallback( (event: FormEvent) => { event.preventDefault(); if (validateForm()) { window.alert(JSON.stringify(formValues, null, 2)); } }, [formValues, validateForm], ); const handleReset = useCallback((event: FormEvent) => { event.preventDefault(); setFormValues({ bio: "", address: "" }); setFieldStates({ bio: null, address: null }); }, []); const handleNameChange = (value: string) => { setFormValues((prev) => ({ ...prev, bio: value })); setFieldStates((prev) => ({ ...prev, name: null })); }; const handleAddressChange = (value: string) => { setFormValues((prev) => ({ ...prev, address: value })); setFieldStates((prev) => ({ ...prev, address: null })); }; return ( handleNameChange(value)} {...(fieldErrors.bio && { invalid: true, errorMessage: fieldErrors.bio })} > handleAddressChange(slicedValue)} {...(fieldErrors.address && { invalid: true, errorMessage: fieldErrors.address })} > 초기화 제출 ); } ``` #### React Hook Form ```tsx import { HStack, VStack } from "@seed-design/react"; import { useCallback, type FormEvent, type KeyboardEvent } from "react"; import { useController, useForm } from "react-hook-form"; import { ActionButton } from "seed-design/ui/action-button"; import { TextField, TextFieldTextarea } from "seed-design/ui/text-field"; interface FormValues { bio: string; address: string; } export default function MultilineTextFieldReactHookForm() { const { handleSubmit, reset, control } = useForm({ defaultValues: { bio: "", address: "", }, shouldFocusError: true, }); const { field: bioField, fieldState: bioFieldState } = useController({ name: "bio", control, rules: { required: "필수 입력 항목입니다", }, }); const { field: { onChange: addressOnChange, ...addressField }, fieldState: addressFieldState, } = useController({ name: "address", control, rules: { required: "필수 입력 항목입니다", pattern: { value: /^대한민국/, message: "대한민국으로 시작해주세요" }, }, }); const onValid = useCallback((data: FormValues) => { window.alert(JSON.stringify(data, null, 2)); }, []); const onReset = useCallback( (event: FormEvent) => { event.preventDefault(); reset(); }, [reset], ); const onMetaReturn = useCallback( (event: KeyboardEvent) => { if (event.key === "Enter" && (event.metaKey || event.ctrlKey)) { event.preventDefault(); handleSubmit(onValid)(); } }, [handleSubmit, onValid], ); return ( addressOnChange(slicedValue)} required {...addressField} > 초기화 제출 ); } ``` #### Formatting ```tsx import { useMemo, useState } from "react"; import { TextField, TextFieldTextarea } from "seed-design/ui/text-field"; export default function MultilineTextFieldFormatting() { const [value, setValue] = useState(""); const formattedValue = useMemo( () => value .split("") .filter((char) => char !== " ") .join(""), [value], ); return ( setValue(value)} > ); } ``` #### Slicing ```tsx import { useState } from "react"; import { TextField, TextFieldTextarea } from "seed-design/ui/text-field"; export default function MultilineTextFieldSlicing() { const [value, setValue] = useState(""); return ( setValue(slicedValue)} > ); } ``` file: ./content/react/components/(text-field)/text-field.mdx # Text Field 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { TextField, TextFieldInput } from "seed-design/ui/text-field"; export default function TextFieldPreview() { return ( ); } ``` ## Installation ## Props ### `TextField` void)", "default": undefined }, maxGraphemeCount: { "type": "number", "default": undefined }, asChild: { "type": "boolean", "default": "false", description: <>

{"Whether the element should be rendered as a child of a slot."}

} }} /> ### `TextFieldInput`

{"Whether the element should be rendered as a child of a slot."}

} }} /> ## Examples ### State #### Enabled ```tsx import { HStack } from "@seed-design/react"; import { TextField, TextFieldInput } from "seed-design/ui/text-field"; export default function TextFieldEnabled() { return ( ); } ``` #### Disabled ```tsx import { HStack } from "@seed-design/react"; import { TextField, TextFieldInput } from "seed-design/ui/text-field"; export default function TextFieldDisabled() { return ( ); } ``` #### Read Only ```tsx import { HStack } from "@seed-design/react"; import { TextField, TextFieldInput } from "seed-design/ui/text-field"; export default function TextFieldReadOnly() { return ( ); } ``` ### Customizable Parts #### Prefix ```tsx import { IconMagnifyingglassLine } from "@karrotmarket/react-monochrome-icon"; import { HStack } from "@seed-design/react"; import { TextField, TextFieldInput } from "seed-design/ui/text-field"; export default function TextFieldPrefix() { return ( } > ); } ``` #### Suffix ```tsx import { IconWonLine } from "@karrotmarket/react-monochrome-icon"; import { HStack } from "@seed-design/react"; import { TextField, TextFieldInput } from "seed-design/ui/text-field"; export default function TextFieldSuffix() { return ( }> ); } ``` #### Both Affixes ```tsx import { IconPlusCircleLine, IconWonLine } from "@karrotmarket/react-monochrome-icon"; import { HStack } from "@seed-design/react"; import { TextField, TextFieldInput } from "seed-design/ui/text-field"; export default function TextFieldSuffix() { return ( } suffixIcon={} > ); } ``` #### Indicator ```tsx import { TextField, TextFieldInput } from "seed-design/ui/text-field"; export default function TextFieldIndicator() { return ( ); } ``` #### Grapheme Count ```tsx import { TextField, TextFieldInput } from "seed-design/ui/text-field"; export default function TextFieldGraphemeCount() { return ( ); } ``` ### Size #### XLarge ```tsx import { TextField, TextFieldInput } from "seed-design/ui/text-field"; export default function TextFieldXlarge() { return ( ); } ``` #### Large ```tsx import { TextField, TextFieldInput } from "seed-design/ui/text-field"; export default function TextFieldLarge() { return ( ); } ``` #### Medium ```tsx import { TextField, TextFieldInput } from "seed-design/ui/text-field"; export default function TextFieldMedium() { return ( ); } ``` ### Use Cases #### Form ```tsx import { HStack, VStack } from "@seed-design/react"; import { useCallback, useState, type FormEvent } from "react"; import { ActionButton } from "seed-design/ui/action-button"; import { TextField, TextFieldInput } from "seed-design/ui/text-field"; interface FormValues { name: string; address: string; } type FieldErrors = Record; export default function TextFieldForm() { const [formValues, setFormValues] = useState({ name: "", address: "", }); const [fieldErrors, setFieldStates] = useState({ name: null, address: null, }); const validateForm = useCallback((): boolean => { let isValid = true; const newFieldErrors: FieldErrors = { name: null, address: null, }; // Name validation if (!formValues.name) { newFieldErrors.name = "필수 입력 항목입니다"; isValid = false; } if (!formValues.address.startsWith("대한민국")) { newFieldErrors.address = "대한민국으로 시작해주세요"; isValid = false; } if (!formValues.address) { newFieldErrors.address = "필수 입력 항목입니다"; isValid = false; } setFieldStates(newFieldErrors); return isValid; }, [formValues]); const handleSubmit = useCallback( (event: FormEvent) => { event.preventDefault(); if (validateForm()) { window.alert(JSON.stringify(formValues, null, 2)); } }, [formValues, validateForm], ); const handleReset = useCallback((event: FormEvent) => { event.preventDefault(); setFormValues({ name: "", address: "" }); setFieldStates({ name: null, address: null }); }, []); const handleNameChange = (value: string) => { setFormValues((prev) => ({ ...prev, name: value })); setFieldStates((prev) => ({ ...prev, name: null })); }; const handleAddressChange = (value: string) => { setFormValues((prev) => ({ ...prev, address: value })); setFieldStates((prev) => ({ ...prev, address: null })); }; return ( handleNameChange(value)} {...(fieldErrors.name && { invalid: true, errorMessage: fieldErrors.name })} > handleAddressChange(slicedValue)} {...(fieldErrors.address && { invalid: true, errorMessage: fieldErrors.address })} > 초기화 제출 ); } ``` #### React Hook Form ```tsx import { HStack, VStack } from "@seed-design/react"; import { useCallback, type FormEvent } from "react"; import { useController, useForm } from "react-hook-form"; import { ActionButton } from "seed-design/ui/action-button"; import { TextField, TextFieldInput } from "seed-design/ui/text-field"; interface FormValues { name: string; address: string; } export default function TextFieldReactHookForm() { const { handleSubmit, reset, control } = useForm({ defaultValues: { name: "", address: "", }, }); const { field: nameField, fieldState: nameFieldState } = useController({ name: "name", control, rules: { required: "필수 입력 항목입니다", }, }); const { field: { onChange: addressOnChange, ...addressField }, fieldState: addressFieldState, } = useController({ name: "address", control, rules: { required: "필수 입력 항목입니다", pattern: { value: /^대한민국/, message: "대한민국으로 시작해주세요" }, }, }); const onValid = useCallback((data: FormValues) => { window.alert(JSON.stringify(data, null, 2)); }, []); const onReset = useCallback( (event: FormEvent) => { event.preventDefault(); reset(); }, [reset], ); return ( addressOnChange(slicedValue)} required {...addressField} > 초기화 제출 ); } ``` #### Number Formatting ```tsx import { useMemo, useState } from "react"; import { TextField, TextFieldInput } from "seed-design/ui/text-field"; export default function TextFieldNumberFormatting() { const [value, setValue] = useState("1000"); const formattedValue = useMemo(() => { if (value === "") return value; const number = Number(value.replace(/,/g, "")); if (Number.isNaN(number)) return ""; return number.toLocaleString(); }, [value]); return ( setValue(value)} > ); } ``` #### Slicing ```tsx import { useState } from "react"; import { TextField, TextFieldInput } from "seed-design/ui/text-field"; export default function TextFieldSlicing() { const [value, setValue] = useState(""); return ( setValue(slicedValue)} > ); } ``` file: ./content/react/components/(typography)/text.mdx # Text 이 문서는 정리 중이에요. 문의 내용은 #_design_core 채널을 찾아주세요. ```tsx import { Flex, Text } from "@seed-design/react"; export default function TextPreview() { return ( 다람쥐 헌 쳇바퀴에 타고파 다람쥐 헌 쳇바퀴에 타고파 다람쥐 헌 쳇바퀴에 타고파 다람쥐 헌 쳇바퀴에 타고파 다람쥐 헌 쳇바퀴에 타고파 다람쥐 헌 쳇바퀴에 타고파 다람쥐 헌 쳇바퀴에 타고파 다람쥐 헌 쳇바퀴에 타고파 다람쥐 헌 쳇바퀴에 타고파 다람쥐 헌 쳇바퀴에 타고파 ); } ``` ## Usage ```tsx import { Text } from "@seed-design/react"; ``` ```tsx ``` ## Props

{"The element to render as"}

}, color: { "type": "ScopedColorFg | ScopedColorPalette", "default": undefined, description: <>

{"The color of the text."}

}, fontSize: { "type": "\"t1\" | \"t2\" | \"t3\" | \"t4\" | \"t5\" | \"t6\" | \"t7\" | \"t8\" | \"t9\" | \"t10\" | \"t2Static\" | \"t5Static\" | \"t6Static\"", "default": undefined, description: <>

{"The font size of the text. Partially overrides the textStyle."}

}, lineHeight: { "type": "\"t1\" | \"t2\" | \"t3\" | \"t4\" | \"t5\" | \"t6\" | \"t7\" | \"t8\" | \"t9\" | \"t10\"", "default": undefined, description: <>

{"The line height of the text. Partially overrides the textStyle."}

}, fontWeight: { "type": "\"regular\" | \"medium\" | \"bold\"", "default": undefined, description: <>

{"The font weight of the text. Partially overrides the textStyle."}

}, maxLines: { "type": "number", "default": undefined, description: <>

{"The maximum number of lines to display. If the text overflows, it will be truncated."}

}, align: { "type": "\"left\" | \"center\" | \"right\"", "default": undefined, description: <>

{"The alignment of the text."}

}, textStyle: { "type": "\"screenTitle\" | \"articleBody\" | \"t1Regular\" | \"t1Medium\" | \"t1Bold\" | \"t2Regular\" | \"t2Medium\" | \"t2Bold\" | \"t3Regular\" | \"t3Medium\" | \"t3Bold\" | \"t4Regular\" | \"t4Medium\" | \"t4Bold\" | ... 12 more ...", "default": "t5Regular" } }} /> file: ./content/react/components/concepts/composition.mdx # Composition 컴포넌트를 조합하여 복잡한 UI를 구성하는 방법과 원칙을 설명합니다. ## `as` Prop `as` prop은 React 컴포넌트가 렌더링하는 기본 HTML 요소를 변경하는 데 사용됩니다. 컴포넌트의 기능은 유지하면서 기본 요소를 변경할 수 있는 간단한 방법을 제공합니다. ```jsx 단락 텍스트 인라인 텍스트 제목 텍스트 ``` ## `asChild` Prop `asChild` prop은 컴포넌트의 기능을 자식 요소에 합성하는 데 사용됩니다. 이를 활용해 HTML 태그를 변경하거나, 다른 컴포넌트에 기능을 주입할 수 있습니다. [Radix UI](https://www.radix-ui.com/primitives/docs/utilities/slot)에서 제공하는 asChild 패턴과 동일한 기능을 제공합니다. ### 요소 타입 변경하기 ```jsx // FAB는 기본적으로 button 태그를 사용하지만, asChild를 사용해 링크로 변경할 수 있습니다. } /> ``` > 기본 요소 타입을 변경하는 경우, 해당 요소가 접근성을 유지하고 올바르게 작동하는지 확인하는 것은 개발자의 책임입니다. 예를 들어, 버튼을 `div`로 변경하면 더 이상 키보드로 접근할 수 없게 될 수 있습니다. ### React 컴포넌트와 조합하기 ```jsx // 라우터 라이브러리에서 제공하는 Link 컴포넌트에 기능을 합성할 수 있습니다. ``` `asChild`를 사용하여 컴포넌트를 조합할 때는 두 가지 원칙을 따라야 합니다. #### 1. 컴포넌트는 props를 전개해야 합니다 asChild는 기능을 제공하고 접근성을 유지하기 위한 고유의 props와 이벤트 핸들러를 전달합니다. 컴포넌트가 이러한 props를 지원하지 않으면 제대로 작동하지 않습니다. ```jsx // 잘못된 방법 const MyButton = () =>