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

react-linky

v1.2.0

Published

A React component to find links in text and turn them into html links

Downloads

21

Readme

React-linky

Build Size Version Downloads

A minimal and tiny React component to find links in text and to turn them into HTML hyperlinks. It gets all kinds of URLs in a simple text and converts them to HTML hyperlink in react. it also supports finding email addresses in the text and convert them to a mailto: hyperlink. It also writes in TypeScript so has its types with itself. And all these features with less than a KB.

You can try a live demo here.

Installation

yarn add react-linky

or

npm i react-linky

Usage

Simple usage:

<Linky>
  If you enjoy the project just visit github.com/react-linky/ and give a start
  to `react-linky` ;)
</Linky>

Nested elements: react-linky also supports nested elements and it converts every string url to a link.

<Linky>
  <h2>
    react-linky <i>(github.com/slasharash/react-linky)</i>
  </h2>
  <p>
    A minimal and tiny React component to find links in text and to turn them
    into html links
  </p>
  <p>
    github is a like a <b>127.0.0.1</b> for us. Now you should know that it
    supports ip addresses too
  </p>
  <p>
    it also supports urls with http, like: https://github.com or
    http://github.com
  </p>
  <p>
    feel free to email me: <i>[email protected]</i>
  </p>
</Linky>

Email: By default, react-linky converts every email to a hyperlink but you can change its behavior by passing a boolean value to the email prop.

<Linky email={false}>
  this email will not convert to a link: [email protected]
</Linky>

Options

| Property | Type | Default | Required | Description | | :--------- | :-----: | :-------: | :------: | :----------------------------------------------------------------------------------- | | className | string | undefined | no | It lets you add a CSS classes to the links | | email | boolean | true | no | If it's enable react-linky also find email addresses and turn them into html links | | noopener | boolean | true | no | It adds a noopener to rel attribute of each link | | noreferrer | boolean | true | no | It adds a noreferrer to rel attribute of each link |