# cloudresizer-react

> A template for publishing a React + TypeScript package to npm

Latest version **1.0.1** (published 2020-07-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install cloudresizer-react
pnpm add cloudresizer-react
yarn add cloudresizer-react
bun add cloudresizer-react
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-07-28 |
| First published | 2020-07-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 0 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 73 |
| Author | ovieokeh |
| Maintainers | cloudresizer |
| Keywords | react, cloudresizer, image, resizer |

## Links

- npm: https://www.npmjs.com/package/cloudresizer-react
- Repository: https://github.com/ovieokeh/npm-react-typescript-template
- Homepage: https://github.com/ovieokeh/npm-react-typescript-template#readme
- Issues: https://github.com/ovieokeh/npm-react-typescript-template/issues
- npm.io page: https://npm.io/package/cloudresizer-react

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

- 1.0.1 (latest) — 2020-07-28
- 1.0.0 — 2020-07-28

## README

# cloudresizer-react

A React component to resize and cache images via CloudResizer.

## Installation
```
$ npm install --save cloudresizer-react
```

## How to use
Wrap the `<img>` element with the `<CloudResizer>` component containing your `username` and any transformations you want.

```
import { CloudResizer } from 'cloudresizer-react';

<CloudResizer username="your_username" width="600">
  <img src="https://example.com/bird.html alt="Bird" />
</CloudResizer>
```

Required:
- `username`

Optional:
- `width`, `height`, `fit`, `background`, `format`. Please refer to [CloudResizer documentation](https://cloudresizer.com/documentation) for full details.


## Publishing

To compile the code once, run

- `npm run build`

To compile the code once and refresh on file change, run

- `npm run start`

To publish the package to npm, make sure you're logged in the correct account by running

- `npm login`

Compile by running

- `npm run build`

Update the package version accordingly by using

- [`npm version [patch | minor | major]`](https://docs.npmjs.com/about-semantic-versioning)

Then publish your package by running

- `npm publish`

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