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

@ruc-lib/tour-guide

v3.1.0

Published

A component for creating a tour guide that provides information and guidance about a specific feature or functionality to the user.

Readme

ruclib-tour-guide

A component for creating a tour guide that provides information and guidance about a specific feature or functionality to the user.

Installation guide

To use the Tour Guide component, you can install the entire RUC library or just this specific component.

Install the Entire Library

npm install @uxpractice/ruc-lib

Install Individual Component

If you only need the Tour Guide component

npm install @ruc-lib/tour-guide

📦 Version Compatibility

Please ensure you install the correct version of @ruc-lib/tour-guide based on your Angular version.

| Angular Version | Compatible @ruc-lib/tour-guide Version | |--------------------|---------------------------------------------| | 15.x.x | npm install @ruc-lib/tour-guide@^3.0.0 | | 16.x.x | npm install @ruc-lib/tour-guide@^3.0.0 |

Usage

1. Import the Component

In your Angular component file (e.g., app.component.ts), import the RuclibTourGuideComponent:

import { Component } from '@angular/core';

// For Complete Library
import { RuclibTourGuideComponent } from '@uxpractice/ruc-lib/tour-guide';

// For Individual Package
import { RuclibTourGuideComponent } from '@ruc-lib/tour-guide';

@Component({
  selector: 'app-root',
  imports: [RuclibTourGuideComponent],
  templateUrl: './app.component.html',
})
export class AppComponent {
  // Component code here
}

2. Use the Component

In your component's template, use the <uxp-ruclib-tour-guide> selector and pass the configuration object to the rucInputData input and the data array to the dataSource input.

<uxp-ruclib-tour-guide 
    [rucInputData]="tourGuideConfig"
    [customTheme]="customTheme" 
    (rucEvent)="passEvent($event)" 
    [dataSource]="tourGuideData">
</uxp-ruclib-tour-guide>

API Reference

Component Inputs

| Input | Type | Description | |----------------|--------------------|---------------------------------------------------| | rucInputData | TourGuideConfig | The main configuration object for the tour guide. | | customTheme | string | An optional CSS class for custom theming. | | dataSource | TourGuideData | Data for the tour guide. |

Component Outputs

| Output | Type | Description | |-----------|-----------|---------------------------------------------------| | rucEvent| any | Emits events related to tour guide actions (e.g., 'skip', 'next', 'finish'). |

TourGuideConfig

This is the main configuration object for the Tour Guide component.

| Property | Type | Description | |--------------------------|---------------------------------------------------------------------|-----------------------------------------------------------------------| | type | 'simple' \| 'advance' | Type of tour guide (e.g., 'simple', 'advance'). | | showSkipButton | boolean | To toggle the visibility of the skip button. | | buttonsFontSize | string | Configure the font size of buttons. | | titleFontSize | string | Configure the font size of the title. | | contentFontSize | string | Configure the font size of the main content. | | buttonsAlignment | 'start' \| 'center' \| 'end' \| 'space-between' \| 'space-around' | Change the alignment of buttons. | | stepCountAlignment | 'start' | 'center' | 'end' | Change the alignment of step count. | | stepCountStartText | string | Text to display at the start of the step count (e.g., 'Step'). | | stepCountMiddleText | string | Text to display in the middle of the step count (e.g., 'of'). | | skipButtonText | string | Text for the skip button. | | prevButtonText | string | Text for the previous button. | | nextButtonText | string | Text for the next button. | | finishButtonText | string | Text for the finish button. | | highlightBorderColor | string | Color of the highlight border around the guided element. | | highlightBorderWidth | string | Width of the highlight border around the guided element. | | defaultPopupWidth | string | Default width of the tour guide popup. |

TourGuideData

This array of objects defines the content for each step of the tour guide.

| Property | Type | Description | |------------|-------------------------------------------------------------|-----------------------------------------------------------------------| | title | string | Title of the tour guide step. | | content | string | Main content/description for the tour guide step. | | selector | string (Only for 'advance' type) | CSS selector for the element to highlight in 'advance' mode. | | position | 'top' \| 'bottom' \| 'left' \| 'right' \| 'auto' | Position of the popup relative to the highlighted element. | | shape | '' \| 'rounded' \| 'rectangle' \| 'circle' | Shape of the description popup. | | width | string | Custom width for the popup of the current step. |

Example Configuration

Here's an example of how to configure the Tour Guide component in your component's TypeScript file.

import { Component } from '@angular/core';

// For Complete Library
import { TourGuideConfig, TourGuideData } from '@uxpractice/ruc-lib/tour-guide';

// For Individual package
import { TourGuideConfig, TourGuideData } from '@ruc-lib/tour-guide';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
})
export class AppComponent {
    tourGuideConfig: TourGuideConfig = {
    type: 'advance',
    showSkipButton: true,
    buttonsFontSize: '14px',
    titleFontSize: '18px',
    contentFontSize: '14px',
    buttonsAlignment: 'end',
    stepCountAlignment: 'center',
    stepCountStartText: 'Step',
    stepCountMiddleText: 'of',
    skipButtonText: 'Skip Tour',
    prevButtonText: 'Previous',
    nextButtonText: 'Next',
    finishButtonText: 'Finish',
    highlightBorderColor: '#007bff',
    highlightBorderWidth: '3px',
    defaultPopupWidth: '300px'
  };

  tourGuideData: TourGuideData[] = [
    {
      title: 'Welcome to Our App!',
      content: 'This tour will guide you through the main features.',
      selector: '', // No specific selector for the first step
      position: 'auto',
      shape: 'rounded',
      width: '350px'
    },
    {
      title: 'Navigation Bar',
      content: 'This is where you can navigate to different sections of the application.',
      selector: '#navbar', // Replace with your actual selector
      position: 'bottom',
      shape: 'rectangle',
      width: '300px'
    },
    {
      title: 'User Profile',
      content: 'Click here to view and manage your profile settings.',
      selector: '#user-profile-icon', // Replace with your actual selector
      position: 'left',
      shape: 'circle',
      width: '280px'
    },
    {
      title: 'Main Content Area',
      content: 'All your important data and features are displayed here.',
      selector: '#main-content', // Replace with your actual selector
      position: 'top',
      shape: 'rounded',
      width: '400px'
    },
    {
      title: 'Notifications',
      content: 'Stay updated with the latest notifications.',
      selector: '#notifications-bell', // Replace with your actual selector
      position: 'right',
      shape: 'rectangle',
      width: '250px'
    }
  ];

  passEvent(event: any) {
    console.log('Tour Guide Event:', event);
  }
}

⚠️ IMPORTANT: Custom Theme Usage in Angular Material

When implementing custom themes, such as:

.custom-theme-1 {
  @include angular-material-theme($custom-theme);
}

// You must also include the typography mixin to ensure text styles are applied correctly as shown below:
.custom-theme-1 {
  @include angular-material-theme($custom-theme);
  @include mat.typography-level($theme-custom-typography-name, body-1);
}

Contribution

Contributions are welcome! Feel free to open issues or pull requests for any enhancements or fixes.

Acknowledgements

Thank you for choosing the Tour Guide component. If you have any feedback or suggestions, please let us know!