{"_id":"@zkochan/boxen","name":"@zkochan/boxen","dist-tags":{"latest":"5.1.2"},"versions":{"5.1.2":{"name":"@zkochan/boxen","version":"5.1.2","description":"Create boxes in the terminal","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/boxen.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"keywords":["cli","box","boxes","terminal","term","console","ascii","unicode","border","text"],"dependencies":{"ansi-align":"^3.0.0","camelcase":"^6.2.0","chalk":"^4.1.0","cli-boxes":"^2.2.1","string-width":"^4.2.2","type-fest":"^0.20.2","widest-line":"^3.1.0","wrap-ansi":"^7.0.0"},"devDependencies":{"ava":"^2.4.0","nyc":"^15.1.0","tsd":"^0.14.0","xo":"^0.36.1"},"scripts":{"test":"xo && nyc ava && tsd"},"_id":"@zkochan/boxen@5.1.2","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/boxen/issues"},"homepage":"https://github.com/sindresorhus/boxen#readme","_integrity":"sha512-MRUN24GOMTa14zkZ4Jd1BPmlagbk10+C6gegE5FgxzTVqiYMcm3KD+2qJs6OmlpEhqUKmm4pu/oTdn0KcMqbXg==","_resolved":"/private/var/folders/g7/5ygp0ncd6qx5g4fn5hpsqq5c0000gn/T/8f150920774c55d1f65b15f56dcb1744/zkochan-boxen-5.1.2.tgz","_from":"file:zkochan-boxen-5.1.2.tgz","_nodeVersion":"20.18.3","_npmVersion":"10.8.2","dist":{"integrity":"sha512-MRUN24GOMTa14zkZ4Jd1BPmlagbk10+C6gegE5FgxzTVqiYMcm3KD+2qJs6OmlpEhqUKmm4pu/oTdn0KcMqbXg==","shasum":"a4f2191b23dc62b71066a26130141e0f2a5956ee","tarball":"https://registry.npmjs.org/@zkochan/boxen/-/boxen-5.1.2.tgz","fileCount":5,"unpackedSize":18372,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIANDn9XO/taMzgpjIGc4AbPwkYaLl7k4UCAivCF7QxF8AiEA/4Kr09sBqA8CzL8dSTH79j7FpkZaMJLloI2B2ZwLbos="}]},"_npmUser":{"name":"zkochan","email":"z@kochan.io"},"directories":{},"maintainers":[{"name":"zkochan","email":"z@kochan.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/boxen_5.1.2_1742234287919_0.43371075655376035"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-17T17:58:07.788Z","5.1.2":"2025-03-17T17:58:08.093Z","modified":"2025-03-17T17:58:08.328Z"},"maintainers":[{"name":"zkochan","email":"z@kochan.io"}],"description":"Create boxes in the terminal","homepage":"https://github.com/sindresorhus/boxen#readme","keywords":["cli","box","boxes","terminal","term","console","ascii","unicode","border","text"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/boxen.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"bugs":{"url":"https://github.com/sindresorhus/boxen/issues"},"license":"MIT","readme":"# boxen\n\n> Create boxes in the terminal\n\n![](screenshot.png)\n\n## Install\n\n```\n$ npm install boxen\n```\n\n## Usage\n\n```js\nconst boxen = require('boxen');\n\nconsole.log(boxen('unicorn', {padding: 1}));\n/*\n┌─────────────┐\n│             │\n│   unicorn   │\n│             │\n└─────────────┘\n*/\n\nconsole.log(boxen('unicorn', {padding: 1, margin: 1, borderStyle: 'double'}));\n/*\n\n   ╔═════════════╗\n   ║             ║\n   ║   unicorn   ║\n   ║             ║\n   ╚═════════════╝\n\n*/\n\nconsole.log(boxen('unicorns love rainbows', {title: 'magical', titleAlignment: 'center'}));\n/*\n┌────── magical ───────┐\n│unicorns love rainbows│\n└──────────────────────┘\n*/\n```\n\n## API\n\n### boxen(text, options?)\n\n#### text\n\nType: `string`\n\nText inside the box.\n\n#### options\n\nType: `object`\n\n##### borderColor\n\nType: `string`\\\nValues: `'black'` `'red'` `'green'` `'yellow'` `'blue'` `'magenta'` `'cyan'` `'white'` `'gray'` or a hex value like `'#ff0000'`\n\nColor of the box border.\n\n##### borderStyle\n\nType: `string | object`\\\nDefault: `'single'`\\\nValues:\n- `'single'`\n```\n┌───┐\n│foo│\n└───┘\n```\n- `'double'`\n```\n╔═══╗\n║foo║\n╚═══╝\n```\n- `'round'` (`'single'` sides with round corners)\n```\n╭───╮\n│foo│\n╰───╯\n```\n- `'bold'`\n```\n┏━━━┓\n┃foo┃\n┗━━━┛\n```\n- `'singleDouble'` (`'single'` on top and bottom, `'double'` on right and left)\n```\n╓───╖\n║foo║\n╙───╜\n```\n- `'doubleSingle'` (`'double'` on top and bottom, `'single'` on right and left)\n```\n╒═══╕\n│foo│\n╘═══╛\n```\n- `'classic'`\n```\n+---+\n|foo|\n+---+\n```\n\nStyle of the box border.\n\nCan be any of the above predefined styles or an object with the following keys:\n\n```js\n{\n\ttopLeft: '+',\n\ttopRight: '+',\n\tbottomLeft: '+',\n\tbottomRight: '+',\n\thorizontal: '-',\n\tvertical: '|'\n}\n```\n\n##### dimBorder\n\nType: `boolean`\\\nDefault: `false`\n\nReduce opacity of the border.\n\n##### title\n\nType: `string`\n\nDisplay a title at the top of the box.\nIf needed, the box will horizontally expand to fit the title.\n\nExample:\n```js\nconsole.log(boxen('foo bar', {title: 'example'}));\n/*\n┌ example ┐\n│foo bar  │\n└─────────┘\n*/\n```\n\n##### titleAlignment\n\nType: `string`\\\nDefault: `'left'`\n\nAlign the title in the top bar.\n\nValues:\n- `'left'`\n```js\n/*\n┌ example ──────┐\n│foo bar foo bar│\n└───────────────┘\n*/\n```\n- `'center'`\n```js\n/*\n┌─── example ───┐\n│foo bar foo bar│\n└───────────────┘\n*/\n```\n- `'right'`\n```js\n/*\n┌────── example ┐\n│foo bar foo bar│\n└───────────────┘\n*/\n```\n\n##### padding\n\nType: `number | object`\\\nDefault: `0`\n\nSpace between the text and box border.\n\nAccepts a number or an object with any of the `top`, `right`, `bottom`, `left` properties. When a number is specified, the left/right padding is 3 times the top/bottom to make it look nice.\n\n##### margin\n\nType: `number | object`\\\nDefault: `0`\n\nSpace around the box.\n\nAccepts a number or an object with any of the `top`, `right`, `bottom`, `left` properties. When a number is specified, the left/right margin is 3 times the top/bottom to make it look nice.\n\n##### float\n\nType: `string`\\\nDefault: `'left'`\\\nValues: `'right'` `'center'` `'left'`\n\nFloat the box on the available terminal screen space.\n\n##### backgroundColor\n\nType: `string`\\\nValues: `'black'` `'red'` `'green'` `'yellow'` `'blue'` `'magenta'` `'cyan'` `'white'` `'gray'` or a hex value like `'#ff0000'`\n\nColor of the background.\n\n##### textAlignment\n\nType: `string`\\\nDefault: `'left'`\\\nValues: `'left'` `'center'` `'right'`\n\nAlign the text in the box based on the widest line.\n\n## Related\n\n- [boxen-cli](https://github.com/sindresorhus/boxen-cli) - CLI for this module\n- [cli-boxes](https://github.com/sindresorhus/cli-boxes) - Boxes for use in the terminal\n- [ink-box](https://github.com/sindresorhus/ink-box) - Box component for Ink that uses this package\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-boxen?utm_source=npm-boxen&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","readmeFilename":"readme.md","_rev":"1-1e4544f66ce6e714b0c883cd80eff333"}