Installation
How to install and setup Jamsr UI in your project.
Get started with JamsrUI Next.js template
Install Packages
To Install JamsrUI, run one of the following commands in your terminal:
pnpm add @jamsr-ui/react framer-motion
Hoisted Dependencies Setup
If you are using pnpm, you need to add the following line to your .npmrc file to hoist our packages to the root node_modules.
public-hoist-pattern[]=*@jamsr-ui/*
After modifying the .npmrc file, you need to delete the previous node_modules and reinstall again to ensure that the dependencies are installed correctly
Tailwind CSS Setup
JamsrUI is built on top of Tailwind CSS, so you need to install Tailwind CSS first. You can follow the official installation guide to install Tailwind CSS. Then you need to add the following code to your tailwind.config.js file:
// tailwind.config.ts
import { withJamsrUI } from "@jamsr-ui/theme";
import type { Config } from "tailwindcss";
const config = withJamsrUI({
content: [
// ...
// make sure it's pointing to the ROOT node_module
"./node_modules/@jamsr-ui/*/dist/*.js",
],
...
});
export default config;
Provider Setup
It is essential to add the JamsrUIProvider at the root of your application.
import { UIProvider } from "@jamsr-ui/react";
function App() {
return (
<UIProvider>
<YourApplication />
</UIProvider>
);
}