External URL link component for React
- 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
npm install --save react-link-external
import LinkExternal from 'react-link-external';
export default MyComponent() {
return (
<LinkExternal href="https://google.com">Link Text</LinkExternal>
);
};
- Required:
true
- Type:
string
The url to link to (maps to <a />
elements href
attribute)
git clone https://github.com/nielse63/react-link-external
cd react-link-external
nvm use
npm ci
npm test
npm test -- --coverage