Skip to content

Repository files navigation

react-autolink

Circle CINPM

An autolink mixin for React

Install

npm i react-autolink
# or
bower i react-autolink # `window.ReactAutolink` is available

Usage

letApp=React.createClass({getDefaultProps(){return{text: "foo bar baz http://example.org bar",};},mixins: [ReactAutolink],render(){return(<div><span>{this.autolink(this.props.text)}</span><span>{this.autolink(this.props.text,{target: "_blank",rel: "nofollow"})}</span><span>{ReactAutolink.autolink(this.props.text)}</span> // or can be used no mixin way
</div>);}});

Tips

In tandem with react-emoji

Development

Dependency

$ npm i

Run

$ npm start # => http://0.0.0.0:8080

Test

$ npm test

License

MIT

About

An autolink mixin for React with keys

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages