{"name":"ink-link","version":"4.1.0","keywords":["ink-component","ink","component","link","hyperlink","url","react","jsx","terminal","term","console","command-line"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"ink-link@4.1.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/ink-link#readme","bugs":{"url":"https://github.com/sindresorhus/ink-link/issues"},"xo":{"extends":["xo-react"]},"ava":{"extensions":{"ts":"module","tsx":"module"},"workerThreads":false},"dist":{"shasum":"6da41c9f24e72c37fa12780ba9a3edd27efe3d48","tarball":"http://registry-npm.ywwl.com/ink-link/download/ink-link-4.1.0.tgz","fileCount":5,"integrity":"sha512-3nNyJXum0FJIKAXBK8qat2jEOM41nJ1J60NRivwgK9Xh92R5UMN/k4vbz0A9xFzhJVrlf4BQEmmxMgXkCE1Jeg==","signatures":[{"sig":"MEUCID/Md1ZIE/Y7XI1L6Ax4uOxGS1mzGy0PmFazjsFiNPTcAiEAj60hZFnP1UoJ8uAPCiAlF2VdzzcJ9aUOssFyFc7BbB8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6332,"size":2487,"noattachment":false,"key":"/ink-link/-/ink-link-4.1.0.tgz"},"type":"module","engines":{"node":">=18"},"exports":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"a3aef0b092d6a3d6773f7ed6009395530d8167c7","scripts":{"test":"xo && NODE_OPTIONS='--import=tsx/esm' FORCE_COLOR=1 ava","build":"tsc","pretest":"npm run build","prepublish":"npm run build"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/ink-link.git","type":"git"},"_npmVersion":"10.6.0","description":"Link component for Ink","directories":{},"_nodeVersion":"18.20.2","dependencies":{"prop-types":"^15.8.1","terminal-link":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.58.0","ava":"^6.1.3","ink":"^5.0.0","tsx":"^4.11.0","react":"^18.3.1","typescript":"^5.4.5","@types/react":"^18.3.3","eslint-plugin-react":"^7.34.2","ink-testing-library":"^4.0.0","@sindresorhus/tsconfig":"^5.0.0","eslint-config-xo-react":"^0.27.0","eslint-plugin-react-hooks":"^4.6.2"},"peerDependencies":{"ink":">=4"},"_npmOperationalInternal":{"tmp":"tmp/ink-link_4.1.0_1720046859615_0.6028621394201554","host":"s3://npm-registry-packages"},"readme":"# ink-link\n\n> Link component for [Ink](https://github.com/vadimdemedes/ink)\n\nCreates clickable links in the terminal!\n\n<img src=\"screenshot.png\" width=\"332\">\n\n## Install\n\n```sh\nnpm install ink-link\n```\n\n## Usage\n\n```js\nimport React from 'react';\nimport {render, Text} from 'ink';\nimport Link from 'ink-link';\n\nrender(\n\t<Link url=\"https://sindresorhus.com\">\n\t\tMy <Text color=\"cyan\">Website</Text>\n\t</Link>\n);\n```\n\n## API\n\n### `<Link>`\n\n[Supported terminals.](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda)\n\nFor unsupported terminals, the link will be printed after the text: `My website https://sindresorhus.com`.\n\n#### url\n\nType: `string`\n\nThe URL to link to.\n\n#### fallback\n\nType: `boolean | (text: string, url: string) => string`\\\nDefault: `true`\n\nDetermines whether the URL should be printed after the text for unsupported terminals: `My website https://sindresorhus.com`.\n\nCan also be a function that receives the text and URL and returns a custom fallback string.\n\n```js\n<Link url=\"https://sindresorhus.com\" fallback={(text, url) => `[${text}](${url})`}>\n\tMy Website\n</Link>\n```\n\n## Related\n\n- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal\n- [ink-gradient](https://github.com/sindresorhus/ink-gradient) - Gradient color component for Ink\n- [ink-big-text](https://github.com/sindresorhus/ink-big-text) - Awesome text component for Ink\n","publish_time":1720046859838,"_cnpm_publish_time":1720046859838,"dist-tags":{"latest":"5.0.0"}}