Skip to contents

Use the calcite-dialog component instead.

Usage

calcite_modal(...)

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
closeButtonDisabledclose-button-disabledWhen true, disables the component's close button.booleanTRUE
dockeddockedWhen true, prevents the component from expanding to the entire screen on mobile devices.booleanTRUE
escapeDisabledescape-disabledWhen true, disables the default close on escape behavior.booleanTRUE
focusTrapDisabledfocus-trap-disabledWhen true, prevents focus trapping.booleanTRUE
fullscreenfullscreenSets the component to always be fullscreen. Overrides widthScale and --calcite-modal-width / --calcite-modal-height.booleanTRUE
kindkindSpecifies the kind of the component, which will apply to top border."brand" | "danger" | "info" | "success" | "warning"TRUE
messageOverridesNAUse this property to override individual strings used by the component.Check API referenceFALSE
openopenWhen true, displays and positions the component.booleanTRUE
outsideCloseDisabledoutside-close-disabledWhen true, disables the closing of the component when clicked outside.booleanTRUE
scalescaleSpecifies the size 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
calciteModalBeforeCloseFires when the component is requested to be closed and before the closing transition begins.
calciteModalBeforeOpenFires when the component is added to the DOM but not rendered, and before the opening transition begins.
calciteModalCloseFires when the component is closed and animation is complete.
calciteModalOpenFires when the component is open and animation is complete.

Slots

The following slots are provided by this component:

SlotDescription
headerA slot for adding header text.
contentA slot for adding the component's content.
content-topA slot for adding content to the component's sticky header, where content remains at the top of the component when scrolling up and down.
content-bottomA slot for adding content to the component's sticky footer, where content remains at the bottom of the component when scrolling up and down.
primaryA slot for adding a primary button.
secondaryA slot for adding a secondary button.
backA slot for adding a back button.

Examples

calcite_modal()
#> <calcite-modal></calcite-modal>