Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-light-tour

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-light-tour

lightweight onboarding tour for react

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

react light tour

Description

A lightweight and customizable React component to create a step-by-step tour guide for your application.

Installation

You can install the package via npm:

npm install react-light-tour

Example

'use client';

import React, { useState } from 'react';
import Tour, { Steps } from 'react-light-tour';

const App = () => {
  const [isTourRunning, setIsTourRunning] = useState(true);

  const steps: Steps = [
    { selector: '#step1', content: 'This is the first step' },
    { selector: '#step2', content: 'This is the second step' },
    { selector: '#step3', content: 'This is the third step' },
  ];

  return (
    <div>
      <button onClick={() => setIsTourRunning(true)}>Start Tour</button>
      <Tour
        isRun={isTourRunning}
        steps={steps}
        buttonsClassName={{ next: 'next-btn', preview: 'prev-btn' }}
      />
      <div id="step1">Step 1</div>
      <div id="step2">Step 2</div>
      <div id="step3">Step 3</div>
    </div>
  );
};

export default App;

Props

The react-light-tour component accepts the following props:

  • isRun: Flag to start or stop the tour.
  • steps: Array of steps for the tour.
  • buttonsClassName: (Optional) Class names for next and preview buttons.
  • saveKey: (Optional) Key for saving tour completion state in local storage.
  • nextText: (Optional) Text for the next button.
  • previewText: (Optional) Text for the preview button.
  • doneText: (Optional) Text for the done button.

Screenshots

Screenshot-react-light-tour

Keywords

FAQs

Package last updated on 10 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc