0.1.4 • Published 3 years ago

@saad27/react-native-bottom-tab-tour v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-native-bottom-tab-tour

Customizable and delightful tour-guide for your bottom tabs

react-native-bottom-tab-tour is a flexible tourguide for your bottom tab navigation.

Preview

tour

Installation

You should already have react-native-safe-area-context installed which comes with the react-navigation package. Run the following to install this package.

yarn install @saad27/react-native-bottom-tab-tour

Usage

import react-native-bottom-tab-tour in your root component, it should be outside of your navigation. like this

import TabTour from "@saad27/react-native-bottom-tab-tour";

const data = [
  {
    title: 'Welcome to the App!\nLets take a tour!', // INTRO ITEM
  },
  {
    title: 'First Tab',
    description: `This is the first tab.\nYou can see the list of all the tabs.`,
  },
  {
    title: '2nd Tab',
    description: `This is the second tab.\nYou can see the list of all the tabs.`,
  },
  {
    title: 'Third Tab',
    description: `This is the second tab.\nYou can see the list of all the tabs.`,
  },
  {
    title: 'Fourth Tab',
    description: `This is the second tab.\nYou can see the list of all the tabs.`,
  },
  {
    title: 'Ready to go!', // ENDING ITEM
    description: `We have come to the end of the tour.\nYou can now use the app.`,
  },
];
const App () => {
    const [showTabTour, setShowTabTour] = React.useState(true);
    <SafeAreaProvider>
        <Navigation />
        {showTabTour && (
          <TabTour data={data} closeTabTour={() => setShowTabTour(false)} />
        )}
        <StatusBar />
    </SafeAreaProvider>    
}

Example

You can run the example from the example folder. Go to example folder, run yarn and expo run ios/android.

Props

There are 2 compuslory props.

  1. data - You need to pass the data array. Each item in the data array will act as an individual view.

For the tab tour to work properly, you need to give an intro item (which is the first index of the array) and an ending item (which is the last item of the array). The intro and ending item appears as a popup in the middle of the screen whereas the other items will be appearing on top of each individual tab.

  1. tabCount - number of tabs.

Interface of the data object.

export interface TOOLTIP_DATA {
  title: string; // TITLE IS COMPULSORY
  titleStyle?: TextStyle;
  description?: string;
  descriptionStyle?: TextStyle;
  style?: ViewStyle;
  btnText?: string; // NEXT BTN TITLE
}

To customize further, there are few more additional props. (The list will grow soon!)

PropsTypeDescription
dataTOOLTIP_DATA[]data array for tour guide
closeTabTour() => voidfor closing the tour view
nextBtnStyleViewStylenext button styling
skipBtnStyleViewStyleskip button styling
opacitynumber (0-1)opacity for the background layer
opacityViewHeightnumberheight of the opacity layer
opacityColorstringbackground color of the opacity view

License

MIT

Contribution

Will be very happy to get any contribution!

acornababJSONStreamabsolute-pathacceptsacorn-globalsacorn-walkabort-controlleragent-baseacorn-jsxaggregate-erroranseradd-streamansi-colorsansi-alignansi-fragmentsansi-cyanansi-escapesansi-grayansi-regexajvansi-stylesanymatchargparsearr-flattenarr-diffansi-redansi-wraparr-unionarray-filterarray-includesarray-ifyarray-slicearray-unionarray.prototype.flatmaparray-reducearrifyasapastral-regexasyncassign-symbolsasynckitat-least-nodearray-maparray-uniquebabel-jestbabel-eslintasync-retryatobbabel-plugin-dynamic-import-nodebabel-plugin-istanbulbabel-plugin-jest-hoistbabel-plugin-polyfill-corejs3babel-plugin-polyfill-regeneratorbabel-plugin-polyfill-corejs2babel-preset-current-node-syntaxbalanced-matchbabel-preset-jestbabel-preset-fbjsbase64-jsbefore-after-hookbig-integerbasebindingsblboxenbplist-creatorbrace-expansionbrowser-process-hrtimebabel-plugin-syntax-trailing-function-commasbplist-parserbrowserslistbserbufferbracesbuffer-crc32cache-basebuffer-frombytescacheable-requestcall-bindcacheable-lookupcaller-callsitecallsitescaller-pathcaniuse-litecamelcasecapture-exitcamelcase-keysci-infochar-regexchardetclass-utilschalkcjs-module-lexerclean-stackcli-cursorcliuicli-widthcli-spinnersclonecli-boxesclone-deepclone-responsecolor-convertcocollect-v8-coveragecollection-visitcolor-supportcolor-namecolorettecombined-streamcommondircompare-funccommand-existscommandercomponent-emittercompressioncompressibleconcat-streamconcat-mapconfigstoreconventional-changelog-codemirrorconventional-changelog-atomconventional-changelogconnectconventional-changelog-eslintconventional-changelog-conventionalcommitsconventional-changelog-coreconventional-changelog-expressconventional-changelog-jqueryconventional-changelog-jshintconventional-changelog-writerconventional-changelog-preset-loaderconventional-commits-filterconventional-changelog-emberconventional-commits-parserconventional-changelog-angularconventional-recommended-bumpconvert-source-mapcore-js-compatcore-util-iscore-jscopy-descriptorcosmiconfigcross-spawncrypto-random-stringcssomcssstyledargsdateformatdayjscsstypedecamelize-keysdebugdecimal.jsdecode-uri-componentdecompress-responsededentdeep-extenddeep-isdecamelizedefaultsdeepmergedefine-propertiesdefer-to-connectdefine-propertydelayed-streamdeprecated-objdenodeifydetect-newlinediff-sequencesdeprecationdeldestroydomexceptiondoctrinedot-propduplexer3dir-globencodeurlee-firstelectron-to-chromiumdepdend-of-streamemitteryemoji-regexdata-urlsencodingenquirererrorhandlererror-stack-parsererror-exescaladees-abstractes-to-primitiveescape-htmlescape-goatescodegeneslint-plugin-flowtypeescape-string-regexpeslint-plugin-eslint-commentseslint-plugin-jesteslint-plugin-react-native-globalsenvinfoeslint-plugin-react-hookseslint-plugin-react-nativeeslint-scopeeslint-visitor-keyseslint-utilsespreeesprimaesqueryesrecurseetagevent-target-shimeslint-plugin-reactestraverseeventemitter3esutilsexpand-bracketsexitexecaexec-shexpectexternal-editorfancy-logextend-shallowextglobfast-difffast-deep-equalfast-levenshteinfastqfast-globfb-watchmanfast-json-stable-stringifyfbjsfiguresfbjs-scriptsfbjs-css-varsfile-entry-cachefill-rangefind-cache-dirfilter-objflatflat-cachefind-upfinalhandlerfile-uri-to-pathfor-infreshfragment-cachefs.realpathform-dataflattedfunctional-red-black-treefunction-bindget-package-typeget-intrinsicget-stdingensyncfseventsget-caller-filefs-extragit-raw-commitsget-symbol-descriptionget-streamgit-semver-tagsget-valuegit-remote-origin-urlgitconfiglocalglobget-pkg-repogit-url-parsegit-upglobal-dirsglob-parentgraceful-fsgotglobalshandlebarsgrowlyglobbyhas-bigintshashas-tostringtaghas-valuehermes-enginehas-yarnhtml-escaperhas-valueshosted-git-infohermes-profile-transformerhttp-errorshttp-cache-semanticshard-rejectionhttps-proxy-agenthuman-signalshttp2-wrapperhttp-proxy-agenticonv-litehtml-encoding-snifferhas-symbolsieee754has-flagimport-cwdignoreimage-sizeimport-fromimurmurhashindent-stringinflightinquirerinheritsiniinternal-slotimport-localinterpretis-accessor-descriptorimport-lazyinvariantimport-freshipis-absoluteis-arrayishis-bufferis-bigintis-boolean-objectis-callableis-core-moduleis-directoryis-data-descriptoris-extendableis-date-objectis-descriptoris-extglobis-dockeris-fullwidth-code-pointis-generator-fnis-installed-globallyis-git-dirtyis-git-repositoryis-numberis-npmis-negative-zerois-interactiveis-objis-number-objectis-regexis-globis-path-insideis-path-cwdis-plain-objis-sshis-relativeis-potential-custom-element-nameis-streamis-shared-array-bufferis-plain-objectis-ciis-symbolis-unc-pathis-text-pathis-stringis-windowsis-unicode-supportedis-wslisarrayisexeis-yarn-globalistanbul-lib-coverageis-weakrefisobjectis-typedarrayisomorphic-fetchistanbul-lib-reportistanbul-lib-source-mapsistanbul-reportsjest-clijest-changed-filesistanbul-lib-instrumentjest-environment-nodejest-docblockjest-get-typejest-diffjest-environment-jsdomjest-jasmine2jest-message-utiljest-haste-mapjest-eachjest-leak-detectorjest-mockjest-regex-utiljest-pnp-resolverjest-runnerjest-resolvejest-serializerjest-resolve-dependenciesjest-runtimejest-utiljest-snapshotjest-validatejest-workerjetifierjest-matcher-utilsjsdomjs-tokensjest-configjest-watcherjs-yamljson-bufferjson-parse-better-errorsjson-stable-stringifyjson-schema-traversejson-parse-even-better-errorsjson-stringify-safejson-stable-stringify-without-jsonifyjson5jsonfilejsescjsonifykeyvjsx-ast-utilsklawjsonparsejsc-androidkleurlines-and-columnslocate-pathload-json-filelevnlatest-versionlodash.ismatchlodash.debouncelodash.throttlelodashlevenlodash.mergelodash.truncatelog-symbolslogkittymake-dirloose-envifylowercase-keysmakeerrormap-cachemap-objmeowlru-cachemacos-releasemap-visitmerge-streammetro-babel-registermetrokind-ofmetro-cachemetro-inspector-proxymerge2metro-coremetro-minify-uglifymetro-configmetro-react-native-babel-presetmetro-react-native-babel-transformermetro-source-mapmetro-symbolicatemetro-babel-transformermetro-resolvermimemicromatchmime-typesminimatchminimistminimist-optionsmimic-fnmixin-deepmime-dbmimic-responsemkdirpmsmin-indentnanomatchnannatural-comparemodify-valuesnegotiatornocachemute-streamnew-github-release-urlnice-tryneo-asyncnode-releasesnode-stream-zipnode-int64normalize-package-datanode-notifiernormalize-pathnwsapinormalize-urlob1npm-run-pathnullthrowsobject-copynode-fetchobject-assignobject-inspectobject.hasownobject.assignobject.fromentriesobject.pickobject.entriesobject-visiton-finishedobject.valuesonetimeopenon-headersonceoptionatoroptionsos-tmpdiros-namep-cancelableorap-finallyp-tryp-locatep-limitparent-moduleparse-pathp-each-seriesp-mappackage-jsonparse-urlparse-node-versionparse-jsonparse5object-keyspascalcasepath-existspath-keypath-is-absolutepath-parsepath-typepiratespicomatchpicocolorspifyparseurlpkg-dirplugin-errorplistposix-character-classesprelude-lsprepend-filepretty-formatprepend-httpprogressprettier-linter-helperspromisepromptspseudomapprocess-nextick-argsprotocolsprop-typespumpquery-stringpupaqueue-microtaskpslqquick-lruqsreact-devtools-corepunycodereact-isreact-refreshread-pkgread-pkg-upreadable-streamrange-parserredentregeneraterechoirregenerator-runtimercregenerate-unicode-propertiesregenerator-transformregex-notregexppregexpu-coreregistry-urlregexp.prototype.flagsremove-trailing-separatorregjsparserrequire-directoryregistry-auth-tokenrepeat-stringrepeat-elementrequire-from-stringresolve-fromresolveresolve-cwdrequire-main-filenameresolve-alpnresolve-globalresolve-urlretryrestore-cursorrsvprimrafresponselikeretreusifyrun-asyncrx-literegjsgenrun-parallelsafer-bufferrxjssafe-regexsanerx-lite-aggregatessemversafe-buffersaxessemver-diffschedulersendserialize-errorserve-staticsetimmediateset-blockingsaxshebang-commandset-valuesetprototypeofshell-quotesignal-exitshebang-regexshellwordsshallow-clonesimple-plistslashshelljssource-mapsnapdragonsnapdragon-nodesnapdragon-utilspdx-exceptionssource-map-resolveslice-ansisource-map-supportsource-map-urlspdx-expression-parsesplit-on-firstspdx-license-idssplit2spdx-correctsplit-stringsprintf-jsstatic-extendstack-utilssplitstackframestacktrace-parserstrict-uri-encodestring_decoderstring-lengthstring.prototype.matchallstatusesstring-widthstring.prototype.trimendstrip-ansistrip-eofstrip-bomstrip-final-newlinestream-buffersstring.prototype.trimstartstrip-indentstrip-json-commentssupports-preserve-symlinks-flagsudo-promptsupports-hyperlinkssymbol-treetemp-writetemp-dirtabletempterminal-linksisteransithroattext-tablethroughtest-excludetmpltmpto-fast-propertiesthrough2text-extensionsto-readable-streamto-object-pathsupports-colorto-regextime-stampto-regex-rangetoidentifiertslibtough-cookietrim-newlinestr46type-checktype-detecttsutilstypedarraytypedarray-to-buffertype-festua-parser-jsunc-path-regexultronuglify-jsunbox-primitiveunicode-canonical-property-names-ecmascriptunicode-match-property-ecmascriptside-channelunicode-property-aliases-ecmascriptuglify-esunicode-match-property-value-ecmascriptunique-stringunion-valueunpipeunset-valueupdate-notifieruniversalifyuniversal-user-agenturi-jsurl-parse-laxuseuse-subscriptionutil-deprecateuuidutils-mergeurixv8-to-istanbulvaryvalidate-npm-package-licensevlqv8-compile-cachewalkerw3c-hr-timewcwidthw3c-xmlserializerurl-joinwhatwg-fetchwhich-modulewebidl-conversionswhichwidest-linewindows-releasewhatwg-encodingwrappywrap-ansiwhich-boxed-primitivewrite-file-atomicwordwrapwhatwg-mimetypexcodexdg-basedirwsword-wrapxml-name-validatorxmldocxmlbuilderwhatwg-urlxmlcharsxpipey18nyallistyamlxtendyargsyargs-parseryocto-queue
0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago