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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-native-tuto-showcase

v1.0.5

Published

Customizable tutorial / spotlight overlay for React Native (onboarding, feature tours, coachmarks).

Downloads

541

Readme

📘 react-native-tuto-showcase

🔦 A fully customizable Spotlight / Tutorial / Coachmark overlay for React Native

Perfect for onboarding flows, feature tours, highlighting UI elements, and guiding users interactively.

Now with full-screen Lottie placement + custom offsets.


✨ Features

  • 🎯 Highlight any UI element with Circle / RoundRect spotlight

  • 📐 Auto-calculated spotlight position using measureInWindow

  • 🔁 Show-once logic (AsyncStorage)

  • 🎞 Lottie Animations with full-screen positioning

    • top-left, top-right, top-center
    • bottom-left, bottom-right, bottom-center
    • center
      • lottieOffset={{dx, dy}}
  • 📦 Multiple spots on one screen

  • ✋ Gesture hints (swipe / scroll)

  • 🎨 Fully customizable:

    • Colors
    • Button style
    • Fonts
    • Overlay background
  • 📱 Works on iOS & Android

  • ⚡ Supports React Native 0.72+


📦 Installation

npm install react-native-tuto-showcase
# or
yarn add react-native-tuto-showcase

🚀 Basic Usage

import React, { useRef } from 'react';
import { View, Text, Pressable } from 'react-native';
import TutoShowcase, { TutoShowcaseHandle } from 'react-native-tuto-showcase';

export default function Home() {
  const tutoRef = useRef<TutoShowcaseHandle>(null);
  const boxRef = useRef<View>(null);

  return (
    <>
      <TutoShowcase
        ref={tutoRef}
        title={<Text style={{ color: '#fff', fontSize: 22 }}>ترتيب الأقسام</Text>}
        description={
          'يمكنك سحب هذا القسم لأعلى أو لأسفل لتغيير ترتيبه.\n' +
          'سيتم حفظ الترتيب تلقائيًا.'
        }
        buttonText="تمام"
      />

      <View ref={boxRef} style={{ marginTop: 120, padding: 20, backgroundColor: '#eee' }}>
        <Text>Drag Me</Text>
      </View>

      <Pressable
        onPress={() =>
          tutoRef.current
            ?.on(boxRef)
            .addRoundRect()
            .withBorder()
            .showOnce('highlight-box')
        }
      >
        <Text>Start Tutorial</Text>
      </Pressable>
    </>
  );
}

🎞 Lottie Placement (New)

The Lottie animation is now positioned relative to the full screen, not the spotlight.


🔹 Available placements

top-left
top-center
top-right
bottom-left
bottom-center
bottom-right
center

🔹 Example

<TutoShowcase
  ref={tutoRef}
  lottie={
    <LottieView
      source={require('./hand.json')}
      style={{ width: 120, height: 120 }}
    />
  }
  lottiePlacement="top-right"
  lottieOffset={{ dx: -20, dy: 10 }}
/>

🧩 Props

<TutoShowcase />

| Prop | Type | Default | Description | | ------------------------ | ------------------------------ | ------------------ | ----------------------- | | title | ReactNode | — | Title JSX | | description | string \| ReactNode | — | Description text | | buttonText | string | "GOT IT" | CTA label | | buttonTextStyle | TextStyle | — | Style for CTA text | | buttonContainerStyle | ViewStyle | — | Style for CTA button | | overlayBackgroundColor | string | rgba(0,0,0,0.78) | Dim overlay color | | onGotIt | () => void | — | Called when CTA pressed | | lottie | ReactElement | — | Lottie animation | | lottiePlacement | "top-left" \| ... | "top-center" | ⭐ Full-screen placement | | lottieOffset | { dx?: number; dy?: number } | {} | Extra offset |


🎛 Ref API

const tutoRef = useRef<TutoShowcaseHandle>(null);

| Method | Description | | -------------------------------------- | ----------------------------- | | on(ref) | Select target element | | addCircle(ratio?) | Add circle spotlight | | addRoundRect(ratio?, radius?, opts?) | Add rounded spotlight | | withBorder() | Add border | | displaySwipableLeft() | Gesture hint | | displaySwipableRight() | Gesture hint | | displayScrollable() | Gesture hint | | onClick(cb) | Capture taps inside spotlight | | show() | Show spotlight immediately | | showOnce(key) | Show once (AsyncStorage) | | resetShowOnce(key) | Clear stored key | | isShowOnce(key) | Check if key shown |


🗂 Show Once Logic

tutoRef.current
  ?.on(boxRef)
  .addCircle()
  .showOnce('first-time');

🎨 Button Customization

<TutoShowcase
  buttonContainerStyle={{
    backgroundColor: '#FFD700',
    borderRadius: 10,
  }}
  buttonTextStyle={{
    color: '#000',
    fontWeight: 'bold',
  }}
/>

📐 Spotlight Options

Circle

.on(ref)
.addCircle(1.3)
.show()

Rounded Rectangle

.on(ref)
.addRoundRect(1.1, 20, { pad: 30 })
.show()

🎥 Demo Videos

📱 iOS

https://github.com/ahmedhegazydev/react-native-tuto-showcase/blob/master/src/assets/SimulatorScreenRecording-iPhone16Pro-2025-11-24at14.14.46online-video-cutter.com-ezgif.com-video-to-gif-converter.gif

🤖 Android

https://github.com/ahmedhegazydev/react-native-tuto-showcase/blob/master/src/assets/ScreenRecording2025-12-02at7.52.23PMonline-video-cutter.com-ezgif.com-video-to-gif-converter.gif


📝 License

MIT © Ahmed Mohamed Ali Ali Hegazy