@uiw/react-auto-link
TypeScript icon, indicating that this package has built-in type declarations

4.22.3 • Public • Published

AutoLink 文本超链接

Buy me a coffee Open in unpkg NPM Downloads npm version

将字符串呈现为纯文本,并将 URL 转换为适当的链接元素。

import { AutoLink } from 'uiw';
// or
import AutoLink from '@uiw/react-auto-link';

基础用法

import React from 'react';
import { AutoLink } from 'uiw';

export default function Demo() {
  return (
    <div>
      <AutoLink
        text="uiw uiwjs uiw https://github.com/uiwjs uiwjs http://github.com/uiwjs"
        target="__blank"
      />
    </div>
  )
}

API

参数 说明 类型 默认值
text 需要处理的文本 String -

Package Sidebar

Install

npm i @uiw/react-auto-link

Weekly Downloads

275

Version

4.22.3

License

MIT

Unpacked Size

6.54 kB

Total Files

7

Last publish

Collaborators

  • uiwjs
  • wcjiang