UXP
v2.0.0
v2.0.0
  • Introduction
    • Welcome
    • Understanding the Portal
    • Getting Started
  • Releases
  • Interface Types
    • Widgets
  • Interface Guidelines
    • Lists
  • Interacting with Lucy
    • Real-Time Communication
  • Interface Guidelines
  • Custom Styles and CSS
  • Publishing your UIs
    • Bundles
  • lucy-xp
  • Components
    • AsyncButton
    • AutoCompleteInput
    • BarChartLoader
    • Button
    • CRUDComponent
    • CalendarComponent
    • Checkbox
    • ColorPallet
    • ColorPicker
    • ConfirmButton
    • DataGrid
    • DataList
    • DataTable
    • DatePicker
    • DateRangePicker
    • DateTimePicker
    • DefaultLoader
    • DonutChartLoader
    • DropDownButton
    • DynamicForm
    • DynamicSelect
    • FileInput
    • FilterPanel
    • FormFeedback
    • FormField
    • GaugeLoader
    • HeatmapChartLoader
    • HorizontalScrollList
    • IconButton
    • Input
    • ItemCard
    • ItemListCard
    • Label
    • LinkButtonWidget
    • LinkWidgetContainer
    • Loading
    • LoadingSpinner
    • LocalizationForm
    • LocalizationFormModal
    • MapComponent
    • Modal
    • ModalWizard
    • MultiSelect
    • NotificationBlock
    • PieChartComponent
    • Popover
    • PortalContainer
    • ProfileImage
    • RadialGauge
    • SampleDataLabel
    • SearchBox
    • Select
    • SideBar
    • SpaceworxDescriptionTag
    • TabComponent
    • TableComponent
    • TextArea
    • ThemeChanger
    • TimePicker
    • TimeRangePicker
    • TitleBar
    • ToggleFilter
    • Tooltip
    • TreeViewSelectInput
    • TrendChartComponent
    • UserProfile
    • WidgetContainerBlock
    • WidgetWrapper
    • Wizard
  • Hooks
    • useAlert
    • useDebounce
    • useEffectWithPolling
    • useEventSubscriber
    • useFields
    • useMessageBus
    • useResizeEffect
    • useToast
    • useUpdateWidgetProps
  • Types
    • ActionResponse
    • CRUDComponentInstanceProps
    • CRUDComponentProps
    • Column
    • DynamicFormFieldProps
    • DynamicFormProps
    • ExtendedFormProps
    • FieldsHook
    • FormProps
    • FormSectionProps
    • FormValue
    • IAlertResult
    • IAnimation
    • IAutoCompleteInputInstanceProps
    • IButtonSize
    • IButtonType
    • IBuyOnSpaceworxButtonProps
    • ICalendarComponentProps
    • ICallback
    • ICheckboxInstanceProps
    • ICheckboxType
    • ICircleBound
    • IColorPalletProps
    • IColorPickerPosition
    • IColorPickerProps
    • IColorTypes
    • IContentFunction
    • IDataFunction
    • IDataItem
    • IDataTableColumn
    • IDatePickerProps
    • IDateRangePickerProps
    • IDateTimePickerProps
    • IDivIconInterface
    • IDropDownButtonPosition
    • IDropDownButtonProps
    • IDynamicSelectDataFunction
    • IEventDispatcher
    • IEventSubscriber
    • IFileInputInstanceProps
    • IFileInputProps
    • IGaugeProps
    • IHeatmapConfiguration
    • IHeatmapPoint
    • IInputInstanceProps
    • IInputType
    • ILanguage
    • ILocalisationFormModalInstanceProps
    • ILocalisationFormModalProps
    • ILocalisationFormProps
    • IMarker
    • IMessage
    • IModalWizardProps
    • IModalWizardStep
    • IModalWizardStepProps
    • IMultiSelectProps
    • IPolygonBound
    • IPopoverPosition
    • IPopoverProps
    • IPortalContainerProps
    • IPosition
    • IPreviewDetails
    • IProfileProps
    • IRegion
    • IRemove
    • IRenderMarkerPopup
    • IRenderMarkerTooltip
    • ISampleDataLabelProps
    • ISearchBoxInstanceProps
    • ISelectProps
    • ISidebarProps
    • ISize
    • ISpaceworxDescriptionTagProps
    • IStaticImage
    • ITextAreaInstanceProps
    • IThemeChangerProps
    • ITitleFunc
    • IToast
    • IToastResult
    • IToggleOption
    • ITooltipPosition
    • ITooltipProps
    • IUseEffectWithPolling
    • IUseUpdateWidgetProps
    • IWidgetContainerBlockProps
    • IWidgetPreloaderLoaderProps
    • IWidgetWrapperProps
    • IWizardStep
    • IWizardStepProps
    • ListProps
    • MessageBusHook
    • PaginationProps
    • RenderCustomFormView
    • ResizeEffectHook
    • TabComponentProps
    • TabComponentStyles
    • TableComponentProps
    • ToastHook
    • TreeViewSelectInputInstanceProps
    • TreeViewSelectInputProps
    • regionType
Powered by GitBook
On this page
  • Installation
  • Examples
  • Properties
  • show
  • onOpen
  • onClose
  • title
  • closeButton
  • styles
  • className
  • headerContent
  • backgroundDismiss
  • showCloseButton
  • animation
  • backdropStyles
  • renderAdditionalContent
  • autoSize
  1. Components

Modal

Display a modal dialog. The dialog will be placed in front of a invisible sheet above the main UI.

Installation

import {Modal} from 'uxp/components';

Examples

<button
     className="btn showcase"
     onClick={() => setShowModal(true)}
 >
     Click to Show Modal
 </button>

 <Modal
     show={showModal}
     onOpen={() => { }}
     onClose={() => setShowModal(false)}
 >
     This is a sample modal
 </Modal>

Properties

Name
Type
Description

show

boolean

Set this to true to make the modal visible

onOpen

() => void

Called whenever the modal is opened

onClose

() => void

Called when the modal gets closed

title

string

The title set in the title bar of the modal If the headerContent attribute is set, then this value will not be used.

closeButton

JSX.Element

any custom component to use to render the dialog close button. If a value is not provided and showCloseButton is set to true, the default close button UI will be rendered

styles

any

Any extra css styles to apply

className

string

Any extra css classes to apply

headerContent

JSX.Element

Any custom content to include in the modal header. If this is set, then the title property will not be used.

backgroundDismiss

boolean

Set to true to allow the dialog to be closed by clicking outside of it

showCloseButton

boolean

Set this to 'true' to show the close button in the dialog

animation

Animation to use when opening/closing a modal

backdropStyles

any

additional styles for backdrop

renderAdditionalContent

() => JSX.Element

additional content to render

autoSize

boolean

show


Set this to true to make the modal visible

type

boolean

onOpen


Called whenever the modal is opened

type

() => void

onClose


Called when the modal gets closed

type

() => void

title


The title set in the title bar of the modal If the headerContent attribute is set, then this value will not be used.

type

string

closeButton


any custom component to use to render the dialog close button. If a value is not provided and showCloseButton is set to true, the default close button UI will be rendered

type

JSX.Element

styles


Any extra css styles to apply

type

any

className


Any extra css classes to apply

type

string

headerContent


Any custom content to include in the modal header. If this is set, then the title property will not be used.

type

JSX.Element

backgroundDismiss


Set to true to allow the dialog to be closed by clicking outside of it

type

boolean

showCloseButton


Set this to 'true' to show the close button in the dialog

type

boolean

animation


Animation to use when opening/closing a modal

type

backdropStyles


additional styles for backdrop

type

any

renderAdditionalContent


additional content to render

type

() => JSX.Element

autoSize


type

boolean

PreviousMapComponentNextModalWizard

Last updated 9 months ago

IAnimation
IAnimation