Link component for Ink
Creates clickable links in the terminal!
npm install ink-link
import React from 'react';
import {render, Text} from 'ink';
import Link from 'ink-link';
render(
<Link url="https://sindresorhus.com">
My <Text color="cyan">Website</Text>
</Link>
);
For unsupported terminals, the link will be printed after the text: My website https://sindresorhus.com
.
Type: string
The URL to link to.
Type: boolean | (text: string, url: string) => string
Default: true
Determines whether the URL should be printed after the text for unsupported terminals: My website https://sindresorhus.com
.
Can also be a function that receives the text and URL and returns a custom fallback string.
<Link url="https://sindresorhus.com" fallback={(text, url) => `[${text}](${url})`}>
My Website
</Link>
- terminal-link - Create clickable links in the terminal
- ink-gradient - Gradient color component for Ink
- ink-big-text - Awesome text component for Ink