Show · UserGuide
UserGuide
Used to guide new users through pages

Demos

How to import

Basic Usage

Theme

popup bubble card mode provides two themes default and primary, set by the theme property.
popup bubble card mode provides 12 positions, optional values are top, topLeft, topRight, left, leftTop, leftBottom, right, rightTop, rightBottom, bottom, bottomLeft, bottomRight, and can be set by the showArrow property to display the arrow.

Set the size of the highlight area

Set by the spotlightPadding property.

Customize the button

Set by the nextButtonProps and prevButtonProps properties.

Controlled

Set by the current property.
Set by the mode property.

No mask

Set by the mask property.

API Reference


PropertiesInstructionsTypeDefaultVersion
classNameCustom class namestring-
currentCurrent step indexnumber0
finishTextText of the last step completion buttonstring'完成'
maskWhether to display the maskbooleantrue
modeGuide mode, optional values: popup (bubble card) or modal (modal)stringpopup
nextButtonPropsThe properties of the next buttonButtonProps{}
onChangeCallback when the step changesfunction(current: number)() => void
onFinishCallback when all steps are completedfunction()() => void
onNextCallback when the next button is clickedfunction(current: number)() => void
onPrevCallback when the previous button is clickedfunction(current: number)() => void
onSkipCallback when the skip button is clickedfunction()() => void
positionThe position of the pop-up layer relative to the target element, optional values: top, topLeft, topRight, left, leftTop, leftBottom, right, rightTop, rightBottom, bottom, bottomLeft, bottomRightstringbottom
prevButtonPropsThe properties of the previous buttonButtonProps{}
showPrevButtonWhether to display the previous buttonbooleantrue
showSkipButtonWhether to display the skip buttonbooleantrue
spotlightPaddingThe inner padding of the highlight area, in pixelsnumber-
stepsGuide step configuration, requiredStepItem[][]
styleCustom styleReact.CSSProperties-
themeTheme style, optional values: default or primarystringdefault
visibleWhether to display the guidebooleanfalse
getPopupContainerSpecify the parent DOM, the pop-up layer will be rendered to the DOM() => HTMLElement-
zIndexPop-up layer levelnumber1030

Steps.Step

PropertiesInstructionsTypeDefaultVersion
classNameCustom class namestring-
coverThe cover image of the stepReactNode-
targetThe target element, the highlight area will focus on this element(() => Element) | Element-
titleStep titlestring | ReactNode-
descriptionStep descriptionReactNode-
maskWhether to display the mask of this step, it will override the global configurationboolean-
showArrowWhether to display the arrow (only valid when mode=popup)booleantrue
spotlightPaddingThe inner padding of the highlight area of this step, it will override the global configurationnumber-
themeThe theme of this step, it will override the global configurationdefault | primary-
positionThe position of the pop-up layer of this step, it will override the global configurationPosition-

Design Tokens