Gathering detailed insights and metrics for react-linkify-it
Gathering detailed insights and metrics for react-linkify-it
Gathering detailed insights and metrics for react-linkify-it
Gathering detailed insights and metrics for react-linkify-it
A tiny react package that turns urls (with i18n and emoji support), emails, jira tickets, twitter handles, anything you want! in your text clickable (aka linkify).
npm install react-linkify-it
Typescript
Module System
Node Version
NPM Version
94.2
Supply Chain
99.5
Quality
75.9
Maintenance
100
Vulnerability
100
License
TypeScript (88.06%)
JavaScript (11.94%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
56 Stars
162 Commits
3 Forks
1 Watchers
11 Branches
2 Contributors
Updated on Jun 27, 2025
Minified
Minified + Gzipped
Latest Version
1.0.8
Package Id
react-linkify-it@1.0.8
Unpacked Size
52.16 kB
Size
12.71 kB
File Count
9
NPM Version
8.19.4
Node Version
16.20.1
Published on
Aug 11, 2023
Cumulative downloads
Total Downloads
1
27
A tiny and dependency free universal linking solution that turns any pattern in your text into clickable links (aka linkify). Supports i18n and emojis.
react-linkify-it
comes with a set of prebuilt components for specific linking needs and a generic component to wrap any pattern with a component.
Prebuilt components for linking:
You can also use the generic component which lets you support your own use case as desired:
react-linkify-it
provides a modern bundle for actively maintained browsers and a larger legacy bundle for older browsers.1npm i react-linkify-it
Every prebuilt component also optionally accepts a className
to attach to the link wrapper
1import { LinkItUrl } from 'react-linkify-it'; 2 3const App = () => ( 4 <div className="App"> 5 <LinkItUrl> 6 <p>"add some link https://www.google.com here"</p> 7 </LinkItUrl> 8 </div> 9); 10
1import { LinkItJira } from 'react-linkify-it'; 2 3const App = () => ( 4 <div className="App"> 5 <LinkItJira domain="https://projectid.atlassian.net"> 6 hello AMM-123 ticket 7 </LinkItJira> 8 </div> 9);
1import { LinkItTwitter } from 'react-linkify-it'; 2 3const App = () => ( 4 <div className="App"> 5 <LinkItTwitter> 6 hello @anantoghosh twitter 7 </LinkItTwitter> 8 </div> 9);
1import { LinkItEmail } from 'react-linkify-it'; 2 3const App = () => ( 4 <div className="App"> 5 <LinkItEmail> 6 hello example@gmail.com email 7 </LinkItEmail> 8 </div> 9);
1import { LinkIt } from 'react-linkify-it'; 2 3const regexToMatch = /@([\w_]+)/; 4 5const App = () => ( 6 <div className="App"> 7 <LinkIt 8 {/* Component to wrap each match with */} 9 component={(match, key) => <a href={match} key={key}>{match}</a>} 10 regex={regexToMatch} 11 > 12 www.google.com<div>hi @anantoghosh</div> 13 </LinkIt> 14 </div> 15); 16
1import { linkIt, UrlComponent } from 'react-linkify-it'; 2 3const regexToMatch = /@([\w_]+)/; 4 5const App = () => { 6 7 const output = linkIt( 8 // Text to be linkified 9 text, 10 // Component to wrap each match with, can be any React component 11 (match, key) => <UrlComponent match={match} key={key} />, 12 regexToMatch 13 ); 14 15 return <div className="App">{output}</div> 16}; 17
Just use more than one component to match multiple patterns.
1import { LinkItEmail, LinkItUrl } from 'react-linkify-it'; 2 3const App = () => ( 4 <div className="App"> 5 <LinkItUrl> 6 <LinkItEmail> 7 hello example@gmail.com https://google.com 8 </LinkItEmail> 9 </LinkItUrl> 10 </div> 11); 12
By default, when you import react-linkify-it
, it will use a modern bundle
meant for browsers which
support RegExp Unicode property escapes.
If you are using babel-preset-env
, or any bundler configuration which uses it (e.g. create-react-app
, vite
) with a
browser which does not support RegExp Unicode property escapes, babel will
transform the code to support the browsers resulting in a larger bundle.
If your setup does not use babel-preset-env
and you would still like to support
older browsers, you can use the legacy bundle by importing:
1import { linkIt, LinkIt } from "react-linkify-it/legacy";
1import { linkIt, LinkIt } from "react-linkify-it/dist/react-linkify-it.legacy.esm.min";
Note: Legacy bundle has a larger file size (~3.4Kb minziped).
An umd build with legacy browser support can be used from Unpkg.
This project was made possible due to the incredible work done on the following projects:
This project is licensed under the MIT License - see the LICENSE file for details.
Hey 👋 If my packages has helped you in any way, consider making a small donation to encourage me to keep contributing. Maintaining good software takes time and effort and for open source developers there is very less incentives to do so. Your contribution is greatly appreciated and will motivate me to continue to support developing my packages which you may have used.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
Found 0/17 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
16 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreLast Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year