Dialog
Dialog is a window containing contextual information, tasks, or workflows that appear over the user interface.
Import
Importimport { Dialog } from '@backyard-ui/core';Usage
UsageSize
SizeUse the size prop to increase the visual size.
Centered
CenteredUse the isCentered prop to center the Dialog vertically.
Scroll
ScrollUse the hasScroll prop if the content overflows beyond the viewport.
Close on Overlay Click
Close on Overlay ClickBy default, the Dialog closes when you click its overlay. You can set closeOnOverlayClick to false if you want the Dialog to stay visible.
Controlled
ControlledBy default, the Dialogs are uncontrolled but you can make it controlled
API Reference
API ReferenceRoot
Root- sizeDescription The `max-width` css propertyType
"xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full"Defaultxl - isOpenDescription If `true` the Dialog will be initially openedType
booleanDefaultfalse - closeOnOverlayClickDescription If `false` the Dialog will be close when clicked on overlayType
booleanDefaulttrue - hasScrollDescription If `true` the content will be scrollableType
booleanDefaultfalse - isCenteredDescription If `true` the Dialog will be centered on screenType
booleanDefaultfalse
Trigger
TriggerContent
Content- asChildDescriptionType
boolean
Cancel
CancelTitle
Title- asChildDescriptionType
boolean
Description
Description- asChildDescriptionType
boolean