Installation
You can install the library using your preferred package manager:
# Using npm
npm install @carton-org/react-neumorphism@latest react react-dom @emotion/css @emotion/react @emotion/styled motion
# Using yarn
yarn add @carton-org/react-neumorphism@latest react react-dom @emotion/css @emotion/react @emotion/styled motion
# Using pnpm
pnpm add @carton-org/react-neumorphism@latest react react-dom @emotion/css @emotion/react @emotion/styled motion
Peer Dependencies
The library requires the following peer dependencies to be installed in your project:
npm install react react-dom @emotion/css @emotion/react @emotion/styled motion
Why Peer Dependencies?
These packages are marked as peer dependencies because:
-
@emotion/css & @emotion/react: These packages are used for styling components with CSS-in-JS. They're kept as peer dependencies to avoid version conflicts and allow you to use your preferred version of Emotion in your project.
-
motion: This library is used for animations and transitions in the neumorphic components. It's a peer dependency to ensure compatibility with your project's animation setup.
-
react & react-dom: These are the core React packages. They're marked as peer dependencies because:
- They should be installed only once in your project
- It prevents version conflicts between different React versions
- It allows you to use the same React instance across your application
By keeping these as peer dependencies, we ensure better compatibility and avoid duplicate installations of these packages in your project.