npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

rn-smart-tour

v1.0.8

Published

Enterprise-grade Digital Adoption Platform (DAP) package for React Native. Provides guided walkthroughs, tooltips, and app tours.

Downloads

797

Readme

rn-smart-tour


✨ Features

  • 🎯 Multi-Pass Measurement: Native measureInWindow API with self-correcting strategy for animation resilience.
  • 📱 Rotation & Resize Aware: Targets re-measure automatically on orientation change or split-screen.
  • Auto-Start Engine: Trigger tours instantly on mount with a smart debounce for layout stability.
  • 💾 Seen State Caching: Persistent "only-once" logic with pluggable storage (AsyncStorage, MMKV, etc.).
  • 🎨 Smart Overlays: Dynamic cutouts with Back/Next/Skip navigation and step indicators.
  • 📜 Auto-Scroll Support: Seamlessly bring tour targets into view with the new DapScrollView integration.

📦 Installation

npm install rn-smart-tour

🚀 Quick Start

1. Wrap your App

Wrap your root component in the DapProvider and define your tours.

import { DapProvider } from 'rn-smart-tour';

const TOURS = {
  'welcome-tour': {
    id: 'welcome-tour',
    steps: [{
      targetId: 'save-btn',
      title: 'Welcome!',
      description: 'Tap here to save your progress.',
    }]
  }
};

export default function App() {
  return (
    <DapProvider tours={TOURS}>
      <MainApp />
    </DapProvider>
  );
}

2. Mark your Target

Wrap any view or button you want to highlight with DapTarget.

import { DapTarget } from 'rn-smart-tour';

const MyButton = () => (
  <DapTarget name="save-btn">
    <Button title="Save" onPress={...} />
  </DapTarget>
);

3. Start the Tour

Use the useDap hook to trigger the onboarding.

import { useDap } from 'rn-smart-tour';

const { startTour } = useDap();
// ...
<Button title="Help" onPress={() => startTour('welcome-tour')} />

4. Enable Auto-Scroll (Optional)

If your targets are hidden inside a long list, swap your standard ScrollView for DapScrollView. The tour will automatically scroll to bring each target into the user's view.

import { DapScrollView } from 'rn-smart-tour';

// ... inside your screen
<DapScrollView>
  <DapTarget name="bottom-btn">
    <Button title="Secret Button" ... />
  </DapTarget>
</DapScrollView>

🧠 Technical Architecture

To guarantee accuracy during navigation animations, rn-smart-tour uses a multi-pass strategy:

  • Pass 1 (100ms): Fast first estimate.
  • Pass 2 (500ms): Corrects after most screen transitions finish.
  • Pass 3 (1000ms): Final safety net for slow async layout shifts.

Measurements only trigger a re-render if the position changes by more than 1pt (threshold).

When autoStart: true is enabled, the overlay waits 300ms after registration. This allows the multi-pass system to settle on the final coordinates before the hole is cut into the backdrop.


🛠 API Reference

Tour Configuration

| Property | Type | Description | |:---|:---|:---| | id | string | Unique identifier for caching. | | autoStart | boolean | Trigger as soon as the first target mounts. | | steps | TourStep[] | Sequence of highlight steps. |

DapScrollView

A direct drop-in replacement for the React Native ScrollView. Supports all standard props. | Property | Type | Description | |:---|:---|:---| | children | React.Node | Components to scroll. | | ...props | ScrollViewProps | Standard props are forwarded to the native ScrollView. |

DapTarget

| Property | Type | Description | |:---|:---|:---| | name | string | Unique identifier that matches a targetId in a tour step. | | children | ReactElement | The UI element to wrap and highlight. | | ...props | ViewProps | All standard React Native View props are forwarded. |

TourStep

| Property | Type | Default | Description | |:---|:---|:---|:---| | targetId | string | — | Matches the name prop in <DapTarget>. | | title | string | — | Tooltip header. | | description | string | — | Tooltip body. | | position | string | 'bottom' | top, bottom, left, right. |

useDap() Hook

| Method | Description | |:---|:---| | startTour(id) | Start a tour by ID. | | stopTour(markAsSeen?)| End tour. Pass false to keep it unread. | | nextStep() / prevStep() | Manual step navigation. | | activeTour | Current active tour object. | | currentStepIndex | Current step number (0-indexed). |


🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.