Layout
Flex
Flex 컴포넌트는 flexbox를 사용하며 디자인 토큰을 JSX에서 사용할 수 있도록 도와줍니다.
import { Flex } from "@seed-design/react";
export default function FlexPreview() {
return (
<Flex direction="row" bg="bg.layerDefault" gap="x2" width="full" borderRadius="r2">
<Flex
direction="column"
bg="bg.brandSolid"
gap="x1_5"
px="x2"
py="x2"
flexGrow={1}
borderRadius="r2"
>
<Flex bg="bg.neutralWeak" px="x4" py="x3" borderRadius="r1">
1
</Flex>
<Flex bg="bg.neutralWeak" px="x4" py="x3" borderRadius="r1">
2
</Flex>
</Flex>
<Flex
direction="row"
bg="bg.brandSolid"
gap="x1_5"
px="x2"
py="x2"
flexGrow={1}
borderRadius="r2"
>
<Flex bg="bg.neutralWeak" px="x4" py="x3" borderRadius="r1">
3
</Flex>
<Flex bg="bg.neutralWeak" px="x4" py="x3" borderRadius="r1">
4
</Flex>
</Flex>
<Flex bg="bg.brandSolid" px="x4" py="x3" borderRadius="r2">
5
</Flex>
</Flex>
);
}Props
Prop
Type
color?(string & {}) | ScopedColorFg | ScopedColorPalette | undefinedasChild?boolean | undefinedpaddingX?0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | undefinedheight?(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | undefinedmaxHeight?(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | undefinedminHeight?(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | undefinedjustifyContent?"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "flexStart" | "flexEnd" | "spaceBetween" | "spaceAround" | undefinedalignItems?"flex-start" | "flex-end" | "center" | "flexStart" | "flexEnd" | "stretch" | undefinedposition?"relative" | "absolute" | "fixed" | "sticky" | undefinedoverflowX?"auto" | "hidden" | "visible" | "scroll" | undefinedoverflowY?"auto" | "hidden" | "visible" | "scroll" | undefinedas?React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefinedbackground?(string & {}) | ScopedColorBg | ScopedColorPalette | ScopedColorBanner | undefinedbackgroundGradient?"fadeLayerFloating" | "fadeLayerDefault" | "glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefinedborderColor?(string & {}) | ScopedColorPalette | ScopedColorStroke | undefinedborderWidth?0 | (string & {}) | 1 | undefinedborderTopWidth?0 | (string & {}) | 1 | undefinedborderRightWidth?0 | (string & {}) | 1 | undefinedborderBottomWidth?0 | (string & {}) | 1 | undefinedborderLeftWidth?0 | (string & {}) | 1 | undefinedborderRadius?0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefinedborderTopLeftRadius?0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefinedborderTopRightRadius?0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefinedborderBottomRightRadius?0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefinedborderBottomLeftRadius?0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefinedboxShadow?(string & {}) | "s1" | "s2" | "s3" | undefinedwidth?(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | undefinedminWidth?(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | undefinedmaxWidth?(string & {}) | "full" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | undefinedtop?0 | (string & {}) | undefinedleft?0 | (string & {}) | undefinedright?0 | (string & {}) | undefinedbottom?0 | (string & {}) | undefinedpadding?0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | undefinedpaddingY?0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | undefinedpaddingTop?0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | "safeArea" | undefinedpaddingRight?0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | undefinedpaddingBottom?0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | "safeArea" | undefinedpaddingLeft?0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | undefinedzIndex?number | (string & {}) | undefinedflexDirection?"row" | "column" | "row-reverse" | "column-reverse" | "rowReverse" | "columnReverse" | undefinedalignContent?"flex-start" | "flex-end" | "center" | "flexStart" | "flexEnd" | "stretch" | undefinedalignSelf?"flex-start" | "flex-end" | "center" | "flexStart" | "flexEnd" | "stretch" | undefinedgap?0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | undefinedgridColumn?string | undefinedgridRow?string | undefinedunstable_transform?string | undefined_active?{ bg?: ScopedColorBg | ScopedColorPalette | (string & {}); background?: ScopedColorBg | ScopedColorPalette | (string & {}); } | undefinedLast updated on