1.6.3 โ€ข Published 6 months ago

react-custom-tours v1.6.3

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

React-custom-tours ๐Ÿ‘ฉโ€๐Ÿซ๐Ÿ†˜๐Ÿ”–

๐Ÿชฒ We recommend installing version starting from 1.3.6 (previous versions have problems) ๐ŸŽ‰ A library for creating step-by-step hints in your applications (Click to open in npm) ๐Ÿงช Tested on projects in production ๐Ÿ”ง Before each update, the library is checked by autotests โญ I would be grateful if you put a star on the GitHub repo

Preview GIF ๐Ÿ“น:

ScreenRecording2024-07-21at1 49 43PM-ezgif com-video-to-gif-converter

Custom themes ๐ŸŒ—:

Screenshot 2024-07-21 at 1 48 34โ€ฏPM Screenshot 2024-07-21 at 1 47 54โ€ฏPM

Custom colors ๐Ÿ’…:

Screenshot 2024-07-21 at 1 49 16โ€ฏPM

Installation ๐Ÿ”ฅ:

npm install react-custom-tours pnpm install react-custom-tours yarn add react-custom-tours

Features ๐Ÿ’ซ:

  • Easy to install in any application (installation time up to 10 minutes);
  • Full customization;
  • Light/dark mode support out of the box;
  • Adaptable to all screen sizes;
  • Keyboard control support;
  • Animations and smoothness out of the box;
  • Can be connected to any components. Also, modal windows with closing on the mousedown event will work, since this event has a stopPropagation listener;

The gist ๐Ÿ‘ฉโ€๐Ÿ’ป:

import React from 'react';
import { TipsProvider, useTips } from 'react-custom-tours/dist/app/main';

function App() {
  const { setShow } = useTips(); // you should use this hook inside the provider

  // you can start showing tooltips when rendering the component, or add playback conditions
  // useEffect(() => {
  //     setShow(true);
  // }, []);

  return (
    <div>
      {/* click this button to start a tour */}
      <button onClick={() => setShow(true)}>Show tips!</button>
      <div id="tip-block">
        <h3>First block with tip!</h3>
      </div>

      <p id="tip-text">Text with tip!</p>
    </div>
  );
}

function Main() {
  <TipsProvider
    tips={[
      {
        idx: 1, // decent number of tip playback
        nodeId: 'tip-block', // block with tip id
        title: 'First block tip title!', // tip title (optional key)
        text: 'First block tip text!', // tip text
      },
      {
        idx: 2,
        nodeId: 'tip-text',
        text: 'Text block tip text!',
        maxWidth: 400, // max width of tooltip (in pixels)
      },
    ]}
    theme="dark" // light is default (optional)
    customColors={{
      // custom tooltip colors for dark/light themes
      dark: {
        primary: '#0dcaf0',
        highlightBorder: '#dc3545',
      },
      light: {
        primary: 'rgb(21,194,30)',
        highlightBorder: 'rgba(158,113,255,0.42)',
      },
    }}
    highlightPadding={10} // padding for highlighting current block
    escapeToClose // adding closing tour using escape keydown (optional)
    isHiddenClose // hide the close tour button until the last step (optional, default = false) (added in v1.3.8)
  >
    <App />
  </TipsProvider>;
}

Projects that use this library ๐Ÿ‘:

1.6.3

6 months ago

1.6.2

6 months ago

1.6.1

7 months ago

1.6.0

7 months ago

1.5.3

9 months ago

1.5.2

11 months ago

1.5.1

12 months ago

1.5.0

12 months ago

1.4.4

12 months ago

1.4.3

12 months ago

1.4.2

12 months ago

1.4.1

12 months ago

1.4.0

12 months ago

1.3.8

1 year ago

1.3.7

1 year ago

1.3.6

1 year ago

1.3.5

1 year ago

1.3.4

1 year ago

1.3.3

1 year ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago