{"name":"ink-link","version":"5.0.0","description":"Link component for Ink","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/ink-link.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"engines":{"node":">=18"},"scripts":{"pretest":"npm run build","prepublish":"npm run build","test":"xo --react && NODE_OPTIONS='--import=tsx/esm' FORCE_COLOR=1 node --test test.tsx","build":"tsc"},"keywords":["ink-component","ink","component","link","hyperlink","url","react","jsx","terminal","term","console","command-line"],"dependencies":{"terminal-link":"^5.0.0"},"peerDependencies":{"ink":">=6"},"devDependencies":{"@sindresorhus/tsconfig":"^8.0.1","@types/prop-types":"^15.7.15","@types/react":"^19.1.13","eslint-config-xo-react":"^0.28.0","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","ink":"^6.3.0","ink-testing-library":"^4.0.0","react":"^19.1.1","tsx":"^4.20.5","typescript":"^5.9.2","xo":"^1.2.2"},"xo":{"rules":{"@typescript-eslint/no-unsafe-call":"off","@typescript-eslint/no-unsafe-assignment":"off","react/function-component-definition":"off","react/react-in-jsx-scope":"off","react/jsx-closing-tag-location":"off"}},"_id":"ink-link@5.0.0","gitHead":"84b6c091d66de61e57049e3d78e789b2500184f7","bugs":{"url":"https://github.com/sindresorhus/ink-link/issues"},"homepage":"https://github.com/sindresorhus/ink-link#readme","_nodeVersion":"20.19.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-TFDXc/0mwUW7LMjsr0/LeLxPVV5BnHDuDQff9RCgP4rb3R+V/4dIwGBZbCevcJZtQnVcW+Iz1LUrUbpq+UDwYA==","shasum":"31e3ef535c8c29c3473819e14e5932b5cba733c3","tarball":"http://registry-npm.ywwl.com/ink-link/download/ink-link-5.0.0.tgz","fileCount":5,"unpackedSize":6538,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIG26zYQhrZ3/bvrsuRVE9XMhu1F4dve19q6xWXZwLOJUAiEA5wdTOeQRJntsvVqESQlc8rPoSfYuGzpM17P1zYOzJeU="}],"size":2529,"noattachment":false,"key":"/ink-link/-/ink-link-5.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ink-link_5.0.0_1757769861796_0.42215818977088215"},"_hasShrinkwrap":false,"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":1757769861965,"_cnpm_publish_time":1757769861965,"dist-tags":{"latest":"5.0.0"}}