il

ink-link

Link component for Ink

Showing:

Popularity

Downloads/wk

32.7K

GitHub Stars

138

Maintenance

Last Commit

9mos ago

Contributors

3

Package

Dependencies

2

Size (min+gzip)

1.8KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

ink-link Build Status

Link component for Ink

Creates clickable links in the terminal!

Looking for a version compatible with Ink 2.x? Check out this release.

Install

$ npm install ink-link

Usage

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>
);

API

Supported terminals.

For unsupported terminals, the link will be printed in parens after the text: My website (https://sindresorhus.com).

url

Type: string

The URL to link to.

fallback

Type: boolean\ Default: true

Determines whether the URL should be printed in parens after the text for unsupported terminals: My website (https://sindresorhus.com).

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100