react-link-external
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i react-link-external

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

20.2 kB

Total Files

18

Last publish

Collaborators

  • nielse63