react-link-external
v1.0.1
Published
> External URL link component for React
Downloads
4
Maintainers
Readme
react-link-external
External URL link component for React
Features
- Standardized external
<a />
tag with all atttributes (target
,rel
, etc.) - Meets WCAG 2.0 Level A and WCAG 2.0 Level AA standards
- Fully tested
Installation
npm install --save react-link-external
Usage
import LinkExternal from 'react-link-external';
export default MyComponent() {
return (
<LinkExternal href="https://google.com">Link Text</LinkExternal>
);
};
API
href
- Required:
true
- Type:
string
The url to link to (maps to <a />
elements href
attribute)
Development
Setup
git clone https://github.com/nielse63/react-link-external
cd react-link-external
nvm use
npm ci
Testing
npm test
npm test -- --coverage