Skip to content

Modal SplitNew: New

Modal split is a focused-experience, introduced as an overlay to explain to customers concepts or actions within the product.

First, import the component.

import {ModalSplit} from '@pleo-io/telescope'

Then use it, like so:

PropTypeDefault
allowPinchZoom
boolean
aria-label
string
aria-labelledby
string
children
enum
dangerouslyBypassFocusLock
boolean
dangerouslyBypassScrollLock
boolean
dangerouslySetZIndexValue
number
initialFocusRef
React.RefObject<any>
isOpen
boolean
onDismiss
function
Information:

Direct children should be ModalSplit.Content and ModalSplit.IllustrationContainer only.

The container for the left hand side content of the modal.

PropTypeDefault
children
enum

A body container that allows long content to scroll within the modal.

PropTypeDefault
children
enum
Information:

Should contain all left hand side content of the modal except for the StepIndicator, Footer and Actions.

This component doesn't accept any custom props.
Information:

Should be placed within ModalSplit.Body to allow for correct padding and scrolling behaviour.

This component doesn't accept any custom props.
This component doesn't accept any custom props.
Information:

Should contain only the ModalSplit.NextButton and/or ModalSplit.BackButton.

PropTypeDefault
as
any
destructive
boolean
disabled
boolean
download
any
forwardedAs
any
fullWidth
boolean
href
string
hrefLang
string
inherit
boolean
loading
boolean
loadingText
string
media
string
ping
string
referrerPolicy
string
rel
string
skeleton
boolean
false
target
string
to
string
tooltipProps
Omit<TooltipProps, "children">

PropTypeDefault
as
any
destructive
boolean
disabled
boolean
download
any
forwardedAs
any
fullWidth
boolean
href
string
hrefLang
string
IconRight
React.ComponentType
inherit
boolean
loading
boolean
loadingText
string
media
string
ping
string
referrerPolicy
string
rel
string
skeleton
boolean
false
target
string
to
string
tooltipProps
Omit<TooltipProps, "children">
This component doesn't accept any custom props.

The container for the right hand side illustration for the modal.

This component doesn't accept any custom props.

The container for the Illustration.

PropTypeDefault
children
any
horizontalAlign
any
p
any
padding
any
paddingBottom
any
paddingLeft
any
paddingRight
any
paddingTop
any
paddingX
any
paddingY
any
pb
any
pl
any
pr
any
pt
any
px
any
py
any
verticalAlign
any

The container for the photograph shown on the modal's right half.

This component doesn't accept any custom props.

PropTypeDefault
activeStep*
string
onClickStep
function
steps*
ModalSplitStep[]

PropTypeDefault
activeStepId*
string
Information:

Should be placed inside of ModalSplit.Content and contain only ModalSplit.Steps as children.

PropTypeDefault
stepId*
string
Information:

Should always be a direct child of a ModalSplit.Steps.

We expose a dedicated hook to manage the steps of the modal split.

const steps = [{stepId: 'step-1'}, {stepId: 'step-2'}]
const {activeStep, setActiveStep, nextStep, previousStep} = useModalSplitSteps({
steps: steps,
initialActiveStep: 'step-1'
})
PropTypeDefault
activeStep

string

setActiveStep

function

nextStep

function

previousStep

function