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

@xintao1105/link

v1.0.12

Published

```bash npm install @xintao1105/link ``` or

Downloads

2

Readme

Install

npm install @xintao1105/link

or

yarn add @xintao1105/link

Basic Usage

import Link from '@xintao1105/link';
import type { linkProps } from '@xintao1105/link';

const ars:linkProps = {
    autoOpen: false,
    target: "_blank",
    levelalignment: "center",
    verticalalignment: "center",
    style: {
        textAlign: "center",
        fontFamily: "Microsoft Yahei",
        fontSize: "32px",
        color: "#ffffff",
        fontWeight: "normal",
        letterSpacing: 0,
        lineHeight: "48px",
        fontStyle: "normal"
    },
    showShadow: false,
    data: {
        url: "http://www.fanliantech.com/",
        text: "文 字 超 链 接 ➚",
    },
  }

<Link {...ars}/>

Component Interface

interface dataType {
    url: string;
    text: number | string;
}

interface linkProps {
    /**
     * 水平对齐方式
     */
    levelalignment?: "left" | "center" | "right"
    /**
     * 垂直对齐方式
     */
    verticalalignment?: "top" | "center" | "bottom"
    /**
     * 文本样式
     */
    style?: CSSProperties
    /**
     * 是否阴影
     */
    showShadow?: boolean
    /**
     * 水平阴影的偏移量 showShadow:true 时生效
     */
    hShadow?: number
    /**
     * 垂直阴影的偏移量 showShadow:true 时生效
     */
    vShadow?: number
    /**
     * 阴影的模糊程度 showShadow:true 时生效
     */
    blurShadow?: number
    /**
     * 阴影的颜色 showShadow:true 时生效
     */
    colorShadow?: string
    /**
     * 默认打开链接 当前窗口页面href链接中包含"/edit/"字段时 autoOpen:true 失效
     */
    autoOpen?: boolean
    /**
     * 打开链接方式 _blank:新打开窗口中载入,_self:当前窗口中载入
     */
    target?: "_blank" | "_self"
    /**
     * 链接限制 是否设置noreferrer、noopener、nofollow, limit:true/false
     */
    limit?: boolean
    /**
     * 数据
     */
    data?: dataType;
    /**
     * 事件
     */
    onClick?: (e: dataType) => void;
}