Skip to contents

Create a Dialog component

Usage

calcite_dialog(...)

Arguments

...

named attributes passed to htmltools::tag()

Value

an object of class calcite_component which is a subclass of shiny.tag

Details

Properties

The following properties are provided by this component:

NameAttributeDescriptionValuesReflects to Attribute
beforeCloseNAPasses a function to run before the component closes.Check API referenceFALSE
closeDisabledclose-disabledWhen true, disables the component's close button.booleanTRUE
descriptiondescriptionA description for the component.stringFALSE
dragEnableddrag-enabledWhen true, the component is draggable.booleanTRUE
escapeDisabledescape-disabledWhen true, disables the default close on escape behavior. By default, an open dialog can be dismissed by pressing the Esc key.booleanTRUE
headingheadingThe component header text.stringFALSE
headingLevelheading-levelSpecifies the heading level of the component's heading for proper document structure, without affecting visual styling.1 | 2 | 3 | 4 | 5 | 6TRUE
kindkindSpecifies the kind of the component, which will style the top border."brand" | "danger" | "info" | "success" | "warning"TRUE
loadingloadingWhen true, a busy indicator is displayed.booleanTRUE
menuOpenmenu-openWhen true, the action menu items in the header-menu-actions slot are open.booleanTRUE
messageOverridesNAUse this property to override individual strings used by the component.Check API referenceFALSE
modalmodalWhen true, displays a scrim blocking interaction underneath the component.booleanTRUE
openopenWhen true, displays and positions the component.booleanTRUE
outsideCloseDisabledoutside-close-disabledWhen true, disables the closing of the component when clicked outside.booleanTRUE
overlayPositioningoverlay-positioningDetermines the type of positioning to use for the overlaid content. Using "absolute" will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. "fixed" should be used to escape an overflowing parent container, or when the reference element's position CSS property is "fixed"."absolute" | "fixed"TRUE
placementplacementSpecifies the placement of the dialog."bottom" | "bottom-end" | "bottom-start" | "center" | "cover" | "top" | "top-end" | "top-start"TRUE
resizableresizableWhen true, the component is resizable.booleanTRUE
scalescaleSpecifies the size of the component."l" | "m" | "s"TRUE
widthwidthSpecifies the width of the component."l" | "m" | "s"TRUE
widthScalewidth-scaleSpecifies the width of the component."l" | "m" | "s"TRUE

Events

The following events are observed by shiny:

EventDescription
calciteDialogBeforeCloseFires when the component is requested to be closed and before the closing transition begins.
calciteDialogBeforeOpenFires when the component is added to the DOM but not rendered, and before the opening transition begins.
calciteDialogCloseFires when the component is closed and animation is complete.
calciteDialogOpenFires when the component is open and animation is complete.
calciteDialogScrollFires when the content is scrolled.

Slots

The following slots are provided by this component:

SlotDescription
Default (unnamed)A slot for adding content.
contentDeprecated Use custom-content slot instead.
custom-contentA slot for displaying custom content. Will prevent the rendering of any default Dialog UI, except for box-shadow and corner-radius.
action-barA slot for adding a calcite-action-bar to the component.
alertsA slot for adding calcite-alerts to the component.
content-bottomA slot for adding content below the unnamed (default) slot and - if populated - the footer slot.
content-topA slot for adding content above the unnamed (default) slot and - if populated - below the action-bar slot.
header-actions-startA slot for adding actions or content to the starting side of the component's header.
header-actions-endA slot for adding actions or content to the ending side of the component's header.
header-contentA slot for adding custom content to the component's header.
header-menu-actionsA slot for adding an overflow menu with actions inside a calcite-dropdown.
fabA slot for adding a calcite-fab (floating action button) to perform an action.
footerA slot for adding custom content to the component's footer. Should not be used with the "footer-start" or "footer-end" slots.
footer-endA slot for adding a trailing footer custom content. Should not be used with the "footer" slot.
footer-startA slot for adding a leading footer custom content. Should not be used with the "footer" slot.

Examples

calcite_dialog()
#> <calcite-dialog></calcite-dialog>