{"_id":"@apaleslimghost/boxen","name":"@apaleslimghost/boxen","dist-tags":{"latest":"5.1.3"},"versions":{"5.1.3":{"name":"@apaleslimghost/boxen","version":"5.1.3","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"},"scripts":{"test":"xo && nyc ava && tsd"},"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"},"types":"./index.d.ts","gitHead":"0dbc5178f00eef969905356f1fac3ccbb6585bf2","bugs":{"url":"https://github.com/sindresorhus/boxen/issues"},"homepage":"https://github.com/sindresorhus/boxen#readme","_id":"@apaleslimghost/boxen@5.1.3","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-UkSSOihJUY2VKdU0WE8NH6xgB/P1iMEODkaXlRqCh5WDZ/8weZq/eHblFJM+F9CCd+QMkIbp2TjCmJB1A9rTRg==","shasum":"4c705d653263d1704873f7aef039a7a7da508499","tarball":"https://registry.npmjs.org/@apaleslimghost/boxen/-/boxen-5.1.3.tgz","fileCount":5,"unpackedSize":18443,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB59SkZqSbvR9I7f2fARMW0NfRue3VgU+RlSI5GHdJ6MAiAx1498vDYvLfHehsXSEjkQuc+7ArOGIfCV1RSEclj/MQ=="}]},"_npmUser":{"name":"quarterto","email":"kara@153.io"},"directories":{},"maintainers":[{"name":"quarterto","email":"kara@153.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/boxen_5.1.3_1713805943731_0.5128664600160704"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-22T17:12:23.601Z","5.1.3":"2024-04-22T17:12:23.875Z","modified":"2024-04-22T17:12:24.251Z"},"maintainers":[{"name":"quarterto","email":"kara@153.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"}