Setup
info
React 19 (or above) is required.
In order to use cotton-box with React, we need to install cotton-box-react.
Installation
Through dependency manager (recommended)
- NPM
- Yarn
- PNPM
- Bun
- Rush
- Deno
npm install cotton-box
npm install cotton-box-react
yarn add cotton-box
npm install cotton-box-react
pnpm add cotton-box
npm install cotton-box-react
bun add cotton-box
npm install cotton-box-react
rush add -p cotton-box
npm install cotton-box-react
deno add npm:cotton-box
// npm:highlight-next-line
npm npm:install npm:cotton-box-react
With UNPKG
For development
<script src="https://www.unpkg.com/cotton-box@<VERSION>/lib/umd/index.js" crossorigin></script>
<script src="https://www.unpkg.com/cotton-box-react@<VERSION>/lib/umd/index.js" crossorigin></script>
For production
<script src="https://www.unpkg.com/cotton-box@<VERSION>/lib/umd/index.min.js" crossorigin></script>
<script src="https://www.unpkg.com/cotton-box-react@<VERSION>/lib/umd/index.min.js" crossorigin></script>
Then replace <VERSION> with the version that you need.