프리뷰 또는 이전 버전의 문서를 보고 있습니다.seed-design.io 방문
우리는 왜 디자인 엔지니어를 찾게 됐을까
Skip to Content
React

Bottom Sheet

화면 하단에서 올라오는 모달 컴포넌트입니다. 추가 정보나 액션 목록을 제공하면서도 현재 컨텍스트를 유지할 때 사용됩니다.

사용 가능 버전@seed-design/[email protected], @seed-design/[email protected]

Stackflow

Stackflow와 Bottom Sheet를 함께 사용하는 방법에 대해 알아보세요.

Installation

npx @seed-design/cli@latest add ui:bottom-sheet

Props

BottomSheetRoot

Prop

Type

headerAlign?"center" | "left" | undefined

Default

"left"

skipAnimation?boolean | undefined

Default

false

activeSnapPoint?string | number | null | undefined
setActiveSnapPoint?((snapPoint: number | string | null) => void) | undefined
open?boolean | undefined
closeThreshold?number | undefined

Number between 0 and 1 that determines when the drawer should be closed. Example: threshold of 0.5 would close the drawer if the user swiped for 50% of the height of the drawer or more.

Default

0.25

onOpenChange?((open: boolean, details?: DrawerChangeDetails) => void) | undefined
scrollLockTimeout?number | undefined

Duration for which the drawer is not draggable after scrolling content inside of the drawer.

Default

500ms

fixed?boolean | undefined

When true, don't move the drawer upwards if there's space, but rather only change it's height so it's fully scrollable when the keyboard is open

handleOnly?boolean | undefined

When true only allows the drawer to be dragged by the <Drawer.Handle /> component.

Default

false

dismissible?boolean | undefined

When false dragging, clicking outside, pressing esc, etc. will not close the drawer. Use this in combination with the open prop, otherwise you won't be able to open/close the drawer.

Default

true

onDrag?((event: React.PointerEvent<HTMLDivElement>, percentageDragged: number) => void) | undefined
onRelease?((event: React.PointerEvent<HTMLDivElement>, open: boolean) => void) | undefined
modal?boolean | undefined

When false it allows to interact with elements outside of the drawer without closing it.

Default

true

onClose?(() => void) | undefined
defaultOpen?boolean | undefined

Opened by default. Still reacts to open state changes

Default

false

repositionInputs?boolean | undefined

When true Vaul will reposition inputs rather than scroll then into view if the keyboard is in the way. Setting it to false will fall back to the default browser behavior.

Default

true when {@link snapPoints} is defined

snapToSequentialPoint?boolean | undefined

Disabled velocity based swiping for snap points. This means that a snap point won't be skipped even if the velocity is high enough. Useful if each snap point in a drawer is equally important.

Default

false

container?HTMLElement | null | undefined
onAnimationEnd?((open: boolean) => void) | undefined

Gets triggered after the open or close animation ends, it receives an open argument with the open state of the drawer by the time the function was triggered. Useful to revert any state changes for example.

autoFocus?boolean | undefined
snapPoints?(string | number)[] | undefined

Array of snap points to use. Example: snapPoints={["100px", "200px", 1]} will use the snap points 100px, 200px and fully open (1 = 100% of the container).

Default

undefined

fadeFromIndex?number | undefined

Index of the snap point to start fading from. Example: fadeFromIndex={0} will start fading from the first snap point.

Default

snapPoints.length - 1

closeOnInteractOutside?boolean | undefined

Whether to close the drawer when interacting outside of the drawer.

Default

true

closeOnEscape?boolean | undefined

Whether to close the drawer when pressing the escape key.

Default

true

lazyMount?boolean | undefined

Whether to lazy mount the drawer content on first open.

Default

false

unmountOnExit?boolean | undefined

Whether to unmount the drawer content on exit.

Default

false

children?React.ReactNode

BottomSheetTrigger

Prop

Type

asChild?boolean | undefined

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

Default

false

BottomSheetContent

Prop

Type

title?React.ReactNode
description?React.ReactNode
layerIndex?number | undefined
showCloseButton?boolean | undefined

Default

true

showHandle?boolean | undefined

Default

false

maxHeight?ResponsiveValue<"full" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | Dimension | (string & {})> | undefined

BottomSheetBody

Prop

Type

asChild?boolean | undefined

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

Default

false

height?ResponsiveValue<"full" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | Dimension | (string & {})> | undefined
minHeight?ResponsiveValue<"full" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | Dimension | (string & {})> | undefined
maxHeight?ResponsiveValue<"full" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | Dimension | (string & {})> | undefined
paddingX?ResponsiveValue<"spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
justifyContent?"center" | "flex-end" | "flex-start" | "space-around" | "space-between" | undefined
alignItems?"center" | "flex-end" | "flex-start" | "stretch" | undefined

BottomSheetFooter

Prop

Type

asChild?boolean | undefined

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

Default

false

Examples

Trigger

<BottomSheetTrigger>는 asChild 패턴을 사용해 자식 요소가 BottomSheet를 열 수 있도록 합니다.

<BottomSheetTrigger>는 aria-haspopup="dialog" 속성을 설정하고, BottomSheet의 open 상태에 따라 aria-expanded 속성을 자동으로 설정합니다. 이 속성은 스크린 리더와 같은 보조 기술에 유용합니다.

Controlled

Trigger 외의 방식으로 BottomSheet를 열고 닫을 수 있습니다. 이 경우 open prop을 사용하여 BottomSheet의 상태를 제어합니다.

onOpenChange Details

onOpenChange 두 번째 인자로 details가 제공됩니다.

reason

열릴 때 (open: true)

  • "trigger": BottomSheetTrigger (BottomSheet.Trigger)로 열림

닫힐 때 (open: false)

  • "closeButton": BottomSheet.CloseButton으로 닫힘
  • "escapeKeyDown": ESC 키 사용
  • "interactOutside": 외부 영역 클릭
  • "drag": 드래그로 닫힘
  • "handleClickOnLastSnapPoint": 마지막 스냅 포인트에서 핸들 클릭으로 닫힘
마지막 열림 이유: -마지막 닫힘 이유: -

Header Align

<BottomSheetRoot>에 headerAlign prop을 설정하여 title과 description의 정렬을 설정할 수 있습니다.

Max Height

BottomSheet는 기본적으로 화면 높이의 90%까지 커지고, 상단 안전 영역을 넘지 않습니다.

<BottomSheetContent>에 maxHeight prop을 전달하면 90% 대신 다른 최대 높이를 지정할 수 있습니다. %는 화면 높이를 기준으로 하며, 어떤 값을 지정해도 상단 안전 영역을 넘지 않습니다. "none" 같은 키워드 값은 상단 안전 영역 제한까지 함께 해제하므로 길이 값을 전달하세요.

본문 안의 특정 영역만 높이를 제한하고 스크롤하게 하려면 그 영역에 maxHeight를 지정합니다.

Snap Points

snapPoints prop을 사용하여 BottomSheet의 커스텀 스냅 포인트를 설정할 수 있습니다.

Fade From Index

<BottomSheetRoot>에 fadeFromIndex prop을 전달하여 뒷 배경이 어두워지는 시작 인덱스를 설정할 수 있습니다.

Show Handle

<BottomSheetContent>에 showHandle prop을 전달하여 Handle을 표시할 수 있습니다. 기본 값은 false입니다.

Show Close Button

<BottomSheetContent>에 showCloseButton prop을 전달하여 닫기 버튼을 표시할 수 있습니다. 기본 값은 true입니다.

showCloseButton을 false로 설정하면 닫기 버튼이 표시되지 않습니다. 이 경우 유저가 BottomSheet를 닫을 수 있는 방법을 제공해야 합니다.

Dismissible

dismissible prop을 false로 설정하면 closeOnEscape, closeOnInteractOutside, draggable 기능이 비활성화됩니다. 의도적으로 BottomSheet를 닫을 수 없게 하고 싶을 때 사용합니다. 이외에는 유저가 BottomSheet를 닫을 수 있는 방법을 제공해야 합니다.

With Scroll Fog

<BottomSheetBody>에 Scroll Fog를 사용하여 스크롤 힌트 효과를 적용할 수 있습니다.

ScrollFog는 항상 효과를 표시하므로, 충분한 padding을 제공해야 합니다. 권장 padding인 하단 80px, 상단 20px을 유지해야 합니다.

Handle Only

<BottomSheetRoot>에 handleOnly prop을 제공하는 경우 쓸어서(swipe) Bottom Sheet를 움직일 수 있는 영역이 핸들 부분으로 제한됩니다.

이 옵션은 <BottomSheetContent showHandle={true}>와 함께 사용할 때만 작동합니다.

Skip Animation

skipAnimation prop을 사용하여 BottomSheet의 enter/exit 애니메이션을 건너뛸 수 있습니다.

Last updated on 2026. 12. 3.