콘텐츠로 이동
RefineUI

Drawer

화면 가장자리에서 미끄러져 나오는 패널 오버레이.

Overview

Machine-readable contract from Component Spec.

component: drawerexport: Drawerversion: 1attributes: data-refineui=drawer

Anatomy

Partdata-refineui
rootdrawer

Variants

AxisValues
typeoverlay, inline
sizesm, md, lg

States

ScopeCategoryValues
componentcomponentdata-state: open, closed
componentenvironmentforced-colors, dir
drawercomponentdata-state: open, closed

Accessibility

SlotElementRole
drawerdivdialog

Keyboard

KeyActionNative
Escapeclose

Focus

SectionPropertyValue
visualrequiredtrue
visualselector:focus-visible
behaviortraptrue
behaviorinitialfirst-focusable
behaviorreturntrigger

Layout

PropertyValue
directionlogical
rtltrue
npm install @refineui/react @refineui/tokens
import {
Drawer,
DrawerTrigger,
DrawerContent,
DrawerHeader,
DrawerTitle,
DrawerDescription,
DrawerBody,
DrawerFooter,
DrawerClose,
Button
} from "@refineui/react";
<Drawer>
<DrawerTrigger asChild>
<Button>Open Drawer</Button>
</DrawerTrigger>
<DrawerContent>
<DrawerHeader>
<DrawerTitle>Settings</DrawerTitle>
<DrawerDescription>Adjust your preferences</DrawerDescription>
</DrawerHeader>
<DrawerBody>
{/* Drawer content */}
</DrawerBody>
<DrawerFooter>
<DrawerClose>Close</DrawerClose>
</DrawerFooter>
</DrawerContent>
</Drawer>
<Drawer type="inline" placement="left" size="md" showFooter>
{/* Drawer content */}
</Drawer>
PropDefaultTypeDescription
openboolean제어형 열림 상태.
defaultOpenboolean비제어형 초기 열림 상태.
onOpenChange(open: boolean) => void열림 상태 변경 시 이벤트 핸들러.
type"overlay""overlay" | "inline"Drawer 표시 타입.
placement"right""left" | "right"화면 쪽.
size"md""sm" | "md" | "lg"Drawer 너비.
showFooterfalseboolean푸터 섹션을 표시합니다.

트리거 요소(보통 Button).

Drawer 패널 컨테이너.

PropDefaultTypeDescription
showClosetrueboolean닫기 버튼을 표시합니다.
actionsReactNode추가 헤더 액션.

Drawer 제목 요소.

Drawer 설명 텍스트.

스크롤 가능한 콘텐츠 영역.

PropDefaultTypeDescription
state"icons" | "single" | "split"푸터 버튼 레이아웃.

닫기 버튼.