Yamada UIにスターをあげる

スター
Yamada UIYamada UIv1.5.1

Dialog

Dialogは、ユーザーに実行の確認または中断に使用されるコンポーネントです。

ソース@yamada-ui/modal

Props

DialogProps

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.

animation

説明

The animation of the tooltip.

タイプ

"bottom" | "left" | "right" | "scale" | "top" | "none"

デフォルト

'scale'

as

タイプ

"symbol" | "object" | "clipPath" | "filter" | "mask" | "marker" | "text" | "g" | "p" | "big" | "link" | "small" | "sub" | "sup" | "style" | "animate" | "section" | "a" | "abbr" | "address" | ... 148 more ... | "textPath"

blockScrollOnMount

説明

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

タイプ

boolean

デフォルト

true

cancel

説明

The dialog cancel to use.

タイプ

type ONLY_FOR_FORMAT = | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | ButtonProps

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.

タイプ

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

containerProps

説明

Props for modal container element.

タイプ

HTMLUIProps<"div">

duration

説明

The animation duration.

タイプ

number | Partial<Record<"exit" | "enter", number>>

finalFocusRef

説明

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

タイプ

RefObject<FocusableElement>

header

説明

The dialog header to use.

タイプ

type ONLY_FOR_FORMAT = | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal

initialFocusRef

説明

ref of the element to receive focus initially.

タイプ

RefObject<FocusableElement>

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

onCancel

説明

The callback invoked when cancel button clicked.

タイプ

(onClose: (() => void) | undefined) => void

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

onOther

説明

The callback invoked when other button clicked.

タイプ

(onClose: (() => void) | undefined) => void

onOverlayClick

説明

Callback fired when the overlay is clicked.

タイプ

() => void

onSuccess

説明

The callback invoked when success button clicked.

タイプ

(onClose: (() => void) | undefined) => void

other

説明

The dialog other to use.

タイプ

type ONLY_FOR_FORMAT = | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | ButtonProps

outside

説明

The CSS padding property.

タイプ

UIValue<number | (string & {}) | "px" | "initial" | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "revert" | "revert-layer" | "unset" | "1" | "-1" | "2" | "-2" | "3" | ... 96 more ... | "-4xl">

placement

説明

The placement of the modal.

タイプ

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

デフォルト

'center'

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

scrollBehavior

説明

Where scroll behavior should originate. - inside: scroll only occurs within the ModalBody. - outside: the entire ModalContent will scroll within the viewport.

タイプ

"outside" | "inside"

デフォルト

'inside'

size

説明

The size of the Dialog.

タイプ

"xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "full"

デフォルト

md

success

説明

The dialog success to use.

タイプ

type ONLY_FOR_FORMAT = | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | ButtonProps

variant

説明

The variant of the Dialog.

タイプ

string

withCloseButton

説明

If true, display the modal close button.

タイプ

boolean

デフォルト

true

withOverlay

説明

If true, display the modal overlay.

タイプ

boolean

デフォルト

true

DialogHeaderProps

DialogBodyProps

DialogFooterProps

DialogOverlayProps

as

タイプ

"symbol" | "object" | "clipPath" | "filter" | "mask" | "marker" | "text" | "g" | "p" | "big" | "link" | "small" | "sub" | "sup" | "style" | "animate" | "section" | "a" | "abbr" | "address" | ... 148 more ... | "textPath"

DialogCloseButtonProps

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でこのページを編集する

ModalDrawer