Yamada UIにスターをあげる

スター
Yamada UIYamada UIv1.6.3

Drawer

Drawerは、画面の端から表示されるパネルのコンポーネントです。

ソース@yamada-ui/modal

Props

DrawerProps

isOpen

必須

説明

If true, the open will be opened.

タイプ

boolean

allowPinchZoom

説明

Handle zoom or pinch gestures on iOS devices when scroll locking is enabled.

タイプ

boolean

デフォルト

false.

as

説明

The HTML element to render.

タイプ

"symbol" | "object" | "clipPath" | "filter" | "g" | "marker" | "mask" | "p" | "text" | "style" | "animate" | "section" | "a" | "abbr" | "address" | "area" | "article" | "aside" | ... 150 more ... | "textPath"

blankForDragProps

説明

Props for the blank area when closeOnDrag is true.

タイプ

CSSUIObject

blockScrollOnMount

説明

If true, scrolling will be disabled on the body when the modal opens.

タイプ

boolean

デフォルト

true

closeOnDrag

説明

If true, then the drawer will close on drag.

タイプ

boolean

デフォルト

false

closeOnEsc

説明

If true, the modal will close when the Esc key is pressed.

タイプ

boolean

デフォルト

true

closeOnOverlay

説明

If true, the modal will close when the overlay is clicked.

タイプ

boolean

デフォルト

true

colorScheme

説明

The visual color appearance of the component.

タイプ

"blackAlpha" | "whiteAlpha" | "amber" | "blue" | "info" | "link" | "primary" | "cyan" | "emerald" | "flashy" | "fuchsia" | "gray" | "green" | "success" | "indigo" | "lime" | "neutral" | "orange" | "warning" | "pink" | "purple" | "red" | "danger" | "rose" | "sky" | "teal" | "violet" | "secondary" | "yellow"

containerProps

説明

Props for modal container element.

タイプ

HTMLUIProps

dragConstraints

説明

Applies constraints on the permitted draggable area.

タイプ

number

デフォルト

0

dragElastic

説明

The degree of movement allowed outside constraints. 0 = no movement, 1 = full movement.

タイプ

number

デフォルト

0.1

dragOffset

説明

Offset from being dragged to closing.

タイプ

number

デフォルト

80

dragVelocity

説明

Velocity of the drag that triggers close.

タイプ

number

デフォルト

100

duration

説明

The animation duration.

タイプ

number | MotionLifecycleProps<number>

finalFocusRef

説明

ref of the element to return focus to when FocusLock unmounts.

タイプ

RefObject<FocusableElement>

initialFocusRef

説明

ref of the element to receive focus initially.

タイプ

RefObject<FocusableElement>

isFullHeight

説明

If true and drawer's placement is top or bottom, the drawer will occupy the viewport height (100dvh).

タイプ

boolean

lockFocusAcrossFrames

説明

Enables aggressive focus capturing within iframes. - If true: keep focus in the lock, no matter where lock is active. - If false: allows focus to move outside of iframe.

タイプ

boolean

デフォルト

false

onClose

説明

Callback invoked to close the modal.

タイプ

() => void

onCloseComplete

説明

Callback function to run side effects after the modal has closed.

タイプ

() => void

onEsc

説明

Callback fired when the escape key is pressed and focus is within modal.

タイプ

() => void

onOverlayClick

説明

Callback fired when the overlay is clicked.

タイプ

() => void

placement

説明

The placement of the drawer.

タイプ

UIValue<"bottom" | "left" | "right" | "top">

デフォルト

'right'

portalProps

説明

Props to be forwarded to the portal component.

タイプ

Omit<PortalProps, "children">

restoreFocus

説明

If true, focus will be restored to the element that triggered the FocusLock once it unmounts.

タイプ

boolean

デフォルト

false

size

説明

The size of the Drawer.

タイプ

"xs" | "sm" | "md" | "lg" | "xl" | "full"

デフォルト

"md"

variant

説明

The variant of the Drawer.

タイプ

string

withCloseButton

説明

If true, display the modal close button.

タイプ

boolean

デフォルト

true

withDragBar

説明

If true, display the drag bar when closeOnDrag is true.

タイプ

boolean

デフォルト

true

withOverlay

説明

If true, display the modal overlay.

タイプ

boolean

デフォルト

true

DrawerHeaderProps

DrawerBodyProps

DrawerFooterProps

DrawerOverlayProps

as

説明

The HTML element to render.

タイプ

"symbol" | "object" | "clipPath" | "filter" | "g" | "marker" | "mask" | "p" | "text" | "style" | "animate" | "section" | "a" | "abbr" | "address" | "area" | "article" | "aside" | ... 150 more ... | "textPath"

DrawerCloseButtonProps

disableRipple

説明

If true, disable ripple effects when pressing a element.

タイプ

boolean

デフォルト

false

isDisabled

説明

If true, the button is disabled.

タイプ

boolean

デフォルト

false

isRounded

説明

If true, the button is full rounded.

タイプ

boolean

デフォルト

false

GitHubでこのページを編集する

DialogMenu