# ink-box

> Styled box component for Ink

Latest version **2.0.0** (published 2023-06-10) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install ink-box
pnpm add ink-box
yarn add ink-box
bun add ink-box
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2023-06-10 |
| First published | 2018-04-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/ink-box) |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 2 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 113 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | ink-component, ink, component, box, boxen, boxes, border, react, jsx, terminal, term, console, command-line |

## Links

- npm: https://www.npmjs.com/package/ink-box
- Repository: https://github.com/sindresorhus/ink-box
- Homepage: https://github.com/sindresorhus/ink-box#readme
- Issues: https://github.com/sindresorhus/ink-box/issues
- npm.io page: https://npm.io/package/ink-box

## Dependencies (2)

- [boxen](https://npm.io/package/boxen.md) ^3.0.0
- [prop-types](https://npm.io/package/prop-types.md) ^15.7.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2023-06-10
- 1.0.0 — 2019-03-07
- 0.1.0 — 2018-04-02

## README

This is deprecated as Ink has a builtin `Box` component now.

---

# ink-box

> Styled box component for [Ink](https://github.com/vadimdemedes/ink)

![](screenshot.png)


## Install

```
$ npm install ink-box
```


## Usage

```js
import React from 'react';
import {render, Color} from 'ink';
import Box from 'ink-box';

render(
	<Box borderStyle="round" borderColor="cyan" float="center" padding={1}>
		I Love <Color magenta>Unicorns</Color>
	</Box>
);
```


## API

### `<Box>`

Props are passed as options to [`boxen`](https://github.com/sindresorhus/boxen#options).


## Related

- [ink-gradient](https://github.com/sindresorhus/ink-gradient) - Gradient color component for Ink
- [ink-link](https://github.com/sindresorhus/ink-link) - Link component for Ink
- [ink-big-text](https://github.com/sindresorhus/ink-big-text) - Awesome text component for Ink


## License

MIT © [Sindre Sorhus](https://sindresorhus.com)

---
_Source: https://npm.io/package/ink-box · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
