JSPM

  • Created
  • Published
  • Downloads 100
  • Score
    100M100P100Q96966F
  • License MIT

AutoLink component

Package Exports

  • @uiw/react-auto-link
  • @uiw/react-auto-link/cjs/index.js
  • @uiw/react-auto-link/esm/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@uiw/react-auto-link) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

AutoLink 文本超链接

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';

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

API

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