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

moebel-react-linkify

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moebel-react-linkify

React component to parse links (urls, emails, etc.) in text into clickable links

  • 0.2.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

react-linkify

React component to parse links (urls, emails, etc.) in text into clickable links

This is a fork!!!

PUBLIC NOTE: Do not use this fork. Instead use original

Examples

Live examples are available at http://tasti.github.io/react-linkify/.

Basic

Any link that appears inside the Linkify component will become clickable.

<Linkify>See examples at tasti.github.io/react-linkify/.</Linkify>

Renders to:

See examples at tasti.github.io/react-linkify/.

Advanced

If you're feeling lazy, you can wrap Linkify around anywhere that you want links to become clickable. Even with nested elements, it traverses the tree to find links.

<Linkify>
  <div>react-linkify <span>(tasti.github.io/react-linkify/)</span></div>
    <div>React component to parse links (urls, emails, etc.) in text into clickable links</div>
  See examples at tasti.github.io/react-linkify/.
    <footer>Contact: tasti@zakarie.com</footer>
</Linkify>

Renders to:

react-linkify (tasti.github.io/react-linkify/)
React component to parse links (urls, emails, etc.) in text into clickable links
See examples at tasti.github.io/react-linkify/.
Contact: tasti@zakarie.com

Installation

npm install react-linkify --save

Usage

var Linkify = require('react-linkify');

React.render(
  <Linkify>Examples are available at tasti.github.io/react-linkify/.</Linkify>,
  document.body
);

Props

component
The type of component to wrap links in.
type: any
default: 'a'

properties
The props that will be added to every matched component.
type: object
default: {}

NOTE: Use Linkify.MATCH as a value to specify the matched link. The properties prop will always contain {href: Linkify.MATCH, key: 'LINKIFY_KEY_#'} unless overridden.

Customization

You can access to the global Linkify instance used to linkify contents by importing it (import { linkify } from 'react-linkify'). That way you can customize as needed (e.g. disabling existing schemas or adding new ones).

Note that any customization made to that instance will affect every Linkify component you use.

Examples

All kind of links detectable by linkify-it are supported. For examples, visit their website.

Keywords

FAQs

Package last updated on 24 Nov 2017

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