Skip to main content

Setup

info

The minimum required version of React for cotton-box to work is 18.

In order to use cotton-box with React, we need to install cotton-box-react.

Installation

Using a dependency manager

yarn add cotton-box
yarn add 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.