{`npm install @nib-components/link\n`}
\n \n\n{`Note: You will also need to install the peerDependencies `}{`@nib/icons`}{` and `}{`@nib-components/theme`}{`.`}
\n
{`import Link from '@nib-components/link';\n`}
\n {`Hello World!\n`}
\n {`Prop`} | \n{`Type`} | \n{`Default`} | \n{`Description`} | \n
---|---|---|---|
{`string`} | \n{`The link color. Must be one of `}{`[`} | \n ||
{`string`} | \n{`The link component.`} | \n||
{`string`} | \n\n | {`The link `} | \n |
{`string`} | \n\n | {`The target for the link. When set to `} | \n |
{`boolean`} | \n{`Show or hide the underline for the link. Links should prefer underlines for improved accessibility.`} | \n||
{`component`} | \n\n | {`Add an icon next to the link text. Must be a valid icon defined in `} | \n |
{`string`} | \n{`The placement of the icon next to the link text. Must be one of `} | \n ||
{`boolean`} | \n{`When `} | \n
{`The simplest way to use icons with the link is with the `}
{`\n Link text\n\n`}
\n {`If you need to customise the icon and have more control over the component, you can provide an icon as an inline function:`}
\n{` } iconPlacement=\"left\">\n Link text\n\n`}
\n {`The recommended icon placement depends on the link context. If using a horizontal chevron (`}
{`Our link component for the `}
{`By default our link meets the minimum contrast ratio for web accessibility when used over either a white or light grey background. Be sure to check the contrast if you are using a different background.`}
\n{`Do not rely on color alone to differentiate links - always use an underline as well.`}
\n{`Our link component is underlined by default to provide an alternative visual cue (other than color) for users who may be color blind. On hover the underline increases from `}
{`You should always use meaningful labelling of links (e.g. \"Hospital cover\") rather than abstract link text (e.g. \"click here\"). This helps users who want to tab from link to link, and assists users with screen readers in understanding the page without having to open each link to see where it leads. Link labels should be consistent with where the user will be taken, and should avoid long phrases or sentences as sentence order can change during language translations.`}
\n{`Link text should be the same if you have multiple links on the same page that lead to the same location. This avoids confusions for all users alike, and assists in understanding for those using assistive technology.`}
\n{`Links should open in the same window in the majority of cases. If your link does need to open in a new tab, do so by adding `}
{`If your link is to download a document, be sure to include the file type and size in the link text. This assists both general users and those with disabilities, and additionally prevents issues for those on devices which don't support the file type downloaded. For example: `}{`Terms and conditions (PDF, 23kb)`}
\n{`Our link component uses an `}
{`import Link from '@nib-components/link';\nimport {Link as ReactRouterLink} from 'react-router';\n\nHello World!;\n`}
\n\n