# react-window-kit

> react window kit.

Latest version **0.1.4** (published 2015-11-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-window-kit
pnpm add react-window-kit
yarn add react-window-kit
bun add react-window-kit
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2015-11-05 |
| First published | 2015-09-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Author | zhbhun |
| Maintainers | zhbhun |
| Keywords | web, kit, react, react-component, modal, dialog, window, front-end |

## Links

- npm: https://www.npmjs.com/package/react-window-kit
- Repository: https://github.com/zhbhun/react-window-kit
- Homepage: http://github.com/zhbhun/react-window-kit
- Issues: https://github.com/zhbhun/react-window-ki/issues
- npm.io page: https://npm.io/package/react-window-kit

## Dependencies (5)

- [react](https://npm.io/package/react.md) ~0.13.3
- [rc-align](https://npm.io/package/rc-align.md) 1.x
- [classnames](https://npm.io/package/classnames.md) ^2.1.3
- [object-assign](https://npm.io/package/object-assign.md) ^4.0.1
- [react-overlays](https://npm.io/package/react-overlays.md) ^0.4.4

## 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

- 0.1.4 (latest) — 2015-11-05
- 0.1.3 — 2015-09-28
- 0.1.2 — 2015-09-24
- 0.1.1 — 2015-09-24
- 0.1.0 — 2015-09-23

## README

# react-window-kit
Kit for creating window component. 

# Install
`npm install --save react-window-kit`

# Usage
As window needs some common component to control window, like button, icon, etc. React-Window-Kit doesn't offer these component, it needs to integrate with other UI component library. For example, [react-bootsrap-window](https://github.com/zhbhun/react-bootstrap-window/blob/master/src/index.js)


# Example
Execute `npm run test`, then check `http://localhost:3000/`

# API
## Window
| name | type | default | description |
| ------------ | ------------ | ------------ | ------------ |
| visible | Boolean | false | whether show window |
| position | Object | `{align: 'cc', offset: [0, 0]}` | Align option values: tr, tc, tl, cl, cc, cr, bl, bc, br. |
| size | Object  |   | width, height |
| closable | Boolean | true |  |
| maximizable | Boolean | false |   |
| backdrop | Boolean | true |   |
| keyboard | Boolean | true |   |
| animation | Boolean/ReactComponent |   |   |
| onAlign | function |   |   |
| onShown | function |   |   |
| onHide | function |   |   |
| onHidden | function |   |   |
| close | ReactElement |   | close button |
| restore | ReactElement |   |  restore button |
| maximize | ReactElement |   |  maximize button |

## Modal
| name | type | default | description |
| ------------ | ------------ | ------------ | ------------ |
| visible | Boolean | false | whether show modal |
| size | String | md | fl: full screen, lg, md, sm |
| header | ReactElement |   |   |
| footer | ReactElement |   |   |
| onHide | function |   |   |

## Confirm
| name | type | default | description |
| ------------ | ------------ | ------------ | ------------ |
| visible | Boolean | false | whether show confirm |
| title | String |   |   |
| onCancel | function |   |   |
| onOk | function |   |   |
| sign | ReactElement |   | sign icon  |
| cancel | ReactElement |   | cancel button |
| ok | ReactElement |   | ok button |

## Tip
| name | type | default | description |
| ------------ | ------------ | ------------ | ------------ |
| visible | Boolean | false | whether show Tip |
| type | String | info | info, success, warning, danger |
| title | String |   |   |
| onOk | function |   |   |
| sign | Object |   | tip sign icon. `{info: ReactElement, success: ReactElement, warning: ReactElement, danger: ReactElement}` |
| ok | ReactElement |   | ok button |

# Feature
- support IE8,IE8+, Chrome, Firefox, Safari

# Todo
1. auto focus 
2. ESC shortcut

# License
react-window-kit is released under the MIT license.

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