Document Component

Lib

Drawer

Description

importimport Drawer from "@lib/component/Drawer";

Examples

Basic

2 cách sử dụng drawer cơ bản

Props

Property
Description
Type
Default
backdropBlur
value blur backdrop
number
-
backdropColor
color backdrop
string
rgba(0,0,0,0.4)
placement
Vị trí của drawer
left | right
right
onBackdropPress
function run when click backdrop
function()
empty function
className
className drawer
string
-
children
Component inside drawer
ReactNode
-
openAnimationDuration
Time open drawer
number
0.3
closeAnimationDuration
Time close drawer
number
0.25
lazyload
Sử dụng khi muốn drawer mở ra thì mới bắt đầu tải dữ liệu
boolean
-
unmountOnHide
unmount component when drawer close
boolean
-
onOpenEnd
function run when drawer is completely opened
function()
empty function
onCloseEnd
function run when drawer is completely closed
function()
empty function

Handler

Method: open: ( ) => void

Method mở Drawer

Method: close: ( ) => void

Method đóng Drawer