BottomSheet

화면 아래에서 올라오는 시트다. 모바일에서 선택지 몇 개를 고르게 할 때 쓴다. 폭은 화면에 맞춰 자기가 정하므로 size 를 받지 않는다. 그 외의 props 와 여는 법은 LayerPopup 과 같다.

import { BottomSheet, useBottomSheet } from "@nui-kit/react";
// 서브패스로 좁힐 때
import { BottomSheet } from "@nui-kit/react/popup";
import "@nui-kit/react/styles/popup.css";   // 온디맨드일 때

선언형 — 열림 상태를 직접 소유

<BottomSheet open={isOpen} onRequestClose={() => setIsOpen(false)} isTopmost title="공유하기">…</BottomSheet>

open · onRequestClose · isTopmost

명령형 — 컴포넌트를 등록해서 열기

useBottomSheet().open({ component }) 로 내용 컴포넌트를 넘긴다. 시트 안의 선택지가 onRequestClose 를 부르면 닫힌다.

bottomSheet.open({ component: ShareSheet });

useBottomSheet().open({ component })

LayerPopup 과 다른 점

LayerPopupBottomSheet
위치가운데아래에 붙는다
등장페이드 + 살짝 확대아래에서 슬라이드
sizesmall · regular · large받지 않는다
기본 접근 이름"레이어 팝업""바텀시트 팝업"

접근성

API

BottomSheet

이름타입기본값설명
open *boolean
bodyClassNamestring
childrenReactNode
classNamestring
closeButtonLabelstring
contentAlignPopupContentAlign
descriptionReactNode
dialogLabelstringtitle 이 없을 때 dialog 에 붙일 접근 이름
footerReactNode
footerClassNamestring
hasCloseButtonboolean
iconReactNode | null
idstring
isTopmostboolean스택 최상단인가 — 포커스 트랩과 ESC 를 이 팝업만 처리한다
onClickClose() => void
onExited() => void닫힘 애니메이션까지 끝난 뒤 호출된다
onRequestClose() => void
panelClassNamestring
shouldCloseOnBackdropbooleandim 클릭으로 닫히는가
shouldCloseOnEscapeboolean
titleReactNode

BottomSheetProps 에서 자동 생성됨 (components/Popup/Popup.types.ts).