1.0.17 • Published 3 years ago

rc-stepguide v1.0.17

Weekly downloads
19
License
ISC
Repository
github
Last release
3 years ago

rc-stepguide

This is a react component for step guide.

Designed to solve the prompting of specific areas in complex applications, can automatically track the prompt target through the node, and have a smooth transition animation;

This component decouples the logic related to the step guidance from the business code, and will not cause intrusive damage to the business code. You only need to set the relevant configuration;

By configuring useEffect, you can customize the active state of the tracked node. For example, the hidden target is displayed when it is guided. For details, you can view SpecialScene in the demo;

中文文档请看这里

demo

install

npm:

npm install --save rc-stepguide

yarn:

yarn add rc-stepguide

Usage

import stepGuide from 'rc-stepguide';
import 'rc-stepguide/lib/index.css';

stepGuide(stepData, setting)

API

StepGuide

PropertyDescriptionTypeDefault
stepDatastepDataListStepData-
settingsettingsSetting-

StepData

PropertyDescriptionTypeDefault
elementdom selectorstring-
titletitleReactNode-
contentcontentReactNode-
placementThe position of the tooltip relative to the target, which can be one of top left right bottom topLeft topRight bottomLeft bottomRight leftTop leftBottom rightTop rightBottomstringrightTop
useEffectAn interception after the target node is selected, some custom side effects can be performed on the target nodefunction(next,dom, currentData)-

Setting

PropertyDescriptionTypeDefault
doneTextText of the done buttonReactNode确定
nextTextText of the next buttonReactNode下一步
showNextWhether show next button or notbooleantrue
prevTextText of the prev buttonReactNode上一步
showPrevWhether show prev button or notbooleanfalse
skipTextText of the skip buttonReactNode跳过
showSkipWhether show skip button or notbooleantrue
maskWhether show mask or notbooleantrue
onPrevSpecify a function that will be called when a user clicks the prev buttonfunction(currentStep)-
onNextSpecify a function that will be called when a user clicks the next buttonfunction(currentStep)-
onOkSpecify a function that will be called when a user clicks the ok buttonfunction-
onSkipSpecify a function that will be called when a user clicks the skip buttonfunction-
1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago