- Notifications
You must be signed in to change notification settings - Fork7
sandeshshrestha/react-user-guide
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
npm install --save react-user-guide
importReact,{Component}from'react';importUserGuidefrom'react-user-guide';conststyle={width:'20vw',backgroundColor:'grey',marginTop:'20vh',marginLeft:'40vw',padding:5};constbuttonConfig={yesText:'Yes',noText:'No',nextText:'Next',skipText:'Skip',finishText:'Finish'};constguides=[{querySelector:'.unique-classname',position:'east',title:'First',message:'User guide position \'east\''},{querySelector:'.unique-classname',position:'west',title:'Second',message:'User guide position \'west\''},{querySelector:'.unique-classname',position:'north',title:'Third',message:'User guide position \'north\''},{querySelector:'.unique-classname',tooltipWidth:500,position:'south',title:'Forth',message:'User guide position \'south\', with custom width'}];exportdefaultclassAppextendsComponent{render(){return(<UserGuidebuttonConfig={buttonConfig}guides={guides}><divstyle={style}className="unique-classname">Target element</div></UserGuide>)}}
@import'~react-user-guide/dist/custom-style.css';
// Style modal.userGuide--modal {h1 { }p { }button { }}// Style mask.userGuide--mask {}// Style tooltip.userGuide--message {h3 { }p { }button { }}
- guides[Guide] - array of all guides/tooltip
- guideKey[string] - unique key that will be used to store in localStorage (default = 'guideKey')
- title[string] - Title used in Modal (default = 'Quick Guide')
- content[string] - Content used in Modal (default = 'Would you like us to walk you through different features in this app?')
- buttonConfig[ButtonConfig] - Text used by different buttons
- querySelector[string] - css selector of the target element
- title[string] - title of tooltop
- message[string] - message of tooltip
- position[string] -(east|west|north|south) - position of tooltip from target element (default = 'north')
- tooltipWidth[int] - width of tooltip (default = 240)
- yesText[string] - Text for 'Yes' button
- noText[string] - Text for 'No' button
- nextText[string] - Text for 'Next' button
- skipText[string] - Text for 'Skip' button
- finishText[string] - Text for 'Finish' button
https://sandeshshrestha.github.io/react-user-guide/
Click here if images didn't load




MIT ©sandeshshrestha
About
React User Guide
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.