다른 컴포넌트 보기

COMPONENT / 오버레이

BottomSheet

아래에서 올라오는 보조 화면.

LIVE PREVIEWWEB
PLAYGROUND미리보기 안의 요소를 직접 조작해 보세요.

사용 코드

import { useState } from 'react';
import * as W from 'woosign-system';

// ThemeProvider와 ToastProvider 안에서 렌더링하세요.
export function Example() {
  const [open, setOpen] = useState(false);
  return (
    <>
      <W.Button onPress={() => setOpen(true)}>시트 열기</W.Button>
      <W.BottomSheet open={open} onClose={() => setOpen(false)}>
        <W.BottomSheet.Header>
          <W.BottomSheet.Title>가까이 있는 선택</W.BottomSheet.Title>
        </W.BottomSheet.Header>
        <W.BottomSheet.Body>편안하게 내용을 확인하세요.</W.BottomSheet.Body>
        <W.BottomSheet.Footer>
          <W.Button onPress={() => setOpen(false)}>완료</W.Button>
        </W.BottomSheet.Footer>
      </W.BottomSheet>
    </>
  );
}
PropType필수
openboolean●
onClose() => void●
closeOnScrimClickboolean—
closeOnEscboolean—
dragToCloseboolean—
maxHeightRationumber—
childrenReactNode—

공통 API 기준입니다. 플랫폼별 style, className 및 세부 타입은 타입 정의에서 확인하세요.

← 전체 컴포넌트로 돌아가기