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 🙏

© 2024 – Pkg Stats / Ryan Hefner

easy-intro

v0.0.6

Published

Step-by-Step operation Guide

Downloads

5

Readme

easy-intro

介绍 English

easy-intro 用于在web页面中,添加一组 引导。 通常用来介绍页面的 功能 向用户介绍页面的大致布局和功能概括; 或者 引导操作 引导用户完成首次操作体验,类似游戏中的新手指引。 通过这种方式,降低用户的学习成本和操作成本。

Example

Example

安装

NPM

npm install easy-intro -S

Yarn

yarn add easy-intro -S

API

| API | param | return | description | | ---------- | ---------- | ------ | ------------------------------------------------------------------------------------------------ | | addIntro | introObj | function | 为单个元素添加引导(通常引导用户点击按钮,产生真实的效果) , 返回一个函数用于移除该引导 | | addIntros | [introObj] | void | 添加一组引导,通常用于功能介绍 | | removeAllIntro | | void | 移除所有的引导元素 |

The introObj is an Object.

| property | type | default | description | | -------- | ---- | ------- | ----------- | | el | DOM element | null | 已经出现在dom上的目标元素 | | desc | String | "" | 引导描述 | | realClick | Boolean | true | 该元素是否真的被点击(即按钮的click事件是否触发) | | hint | Boolean | true | 是否显示引导点击的动画效果 |

用法

通过插件的形式,在已有的dom元素上添加引导蒙层。

// example.js
import { addIntro, addIntros, removeAllIntro } from "easy-intro";

// Start the introduction for single defined element
const removeIntroItem = addIntro({
  el: document.getElementById('button'),  // 已经出现在dom上的目标元素
  desc: 'Click Me!', // 引导描述
  realClick: true,  // 该元素是否真的被点击(即按钮的click事件是否触发)
  hint: true, // 是否显示引导点击的动画效果
})

// remove this introduction
removeIntroItem();

// Start the introduction for defined elements.
addIntros([
  {
    el: document.getElementById('step-1'),
    desc: 'First Step! click me!',
    realClick: false,
    hint: false,
  },
  {
   el: document.getElementById('step-2'),
   desc: 'Second Step! click me!',
   realClick: false,
   hint: false,
   },
   {
   el: document.getElementById('step-3'),
   desc: 'Third Step! click me!',
   realClick: false,
   hint: false,
   }
]);

// remove All introductions
removeAllIntro();