https://github.com/git-ced/solid-links
Transform URLs in strings to actual links.
https://github.com/git-ced/solid-links
linkify solidjs
Last synced: 6 months ago
JSON representation
Transform URLs in strings to actual links.
- Host: GitHub
- URL: https://github.com/git-ced/solid-links
- Owner: git-ced
- License: mit
- Created: 2022-02-17T08:56:09.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-17T22:25:03.000Z (almost 4 years ago)
- Last Synced: 2025-07-31T10:55:48.832Z (7 months ago)
- Topics: linkify, solidjs
- Language: TypeScript
- Homepage:
- Size: 1010 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Transform URLs in strings to actual links. It will find valid links in the given string and create `` tags for it.
Internally, it uses this **[Regex](https://regexr.com/6fkup)** to identify links.
[](https://www.npmjs.com/package/solid-links)




## Table of Contents
- [Installation](#installation)
- [Setup](#setup)
- [Usage](#usage)
- [Authors](#authors)
- [Changelog](#changelog)
- [License](#license)
## Installation
This library is available through the [npm registry](https://www.npmjs.com/).
NPM
```bash
$ npm -i solid-links
```
Yarn
```bash
$ yarn add solid-links
```
## Setup
Start using it by importing the library first.
### CommonJS
```javascript
const Linkify = require('solid-links');
```
or
### ES6
```javascript
import Linkify from 'solid-links';
```
## Usage
```javascript
import Linkify from 'solid-links';
const TEST_STRING = `
Will match the following cases
http://www.foufos.gr
https://www.foufos.gr
http://foufos.gr
http://www.foufos.gr/kino
http://werer.gr
www.foufos.gr
www.mp3.com
www.t.co
http://t.co
http://www.t.co
https://www.t.co
www.aa.com
http://aa.com
http://www.aa.com
https://www.aa.com
Will NOT match the following
www.foufos
www.foufos-.gr
www.-foufos.gr
foufos.gr
http://www.foufos
http://foufos
www.mp3#.com
`;
export default function Sample() {
return (
);
}
```
## Authors
- [Prince Neil Cedrick Castro](https://github.com/git-ced/) - Initial work
See also the list of [contributors](https://github.com/git-ced/solid-links/contributors) who participated in this project.
## Changelog
[Changelog](https://github.com/git-ced/solid-links/releases)
## License
[MIT](LICENSE)