@primal/primitives
v0.0.4
Published
inspr design language primitives
Downloads
4
Readme
🎉 Getting Started
Primitives
The primitives library is a component library for Nextjs created by the Inspr team!
To use our primitives library, run the following npm command:
npm i @primal/icons @primal/state @primal/theme @primal/primitives
This package has as peerDepencies the following:
"@emotion/react": "^11.7.1",
"@emotion/styled": "^11.6.0",
"next": "^12.0.8",
"react": "^17.0.2",
"react-dom": "^17.0.2"
Since npm does not install them automatically, you can do:
npm i @[email protected] @emotion/[email protected] react react-dom next
Or, if you start your Next application with:
npx create-next-app website --ts
Then you can only install emotion after that!
Finally, when you create your Next application you need to tell Next to transpile some of our libraries, since they were done in Typescript! To do that you can install the Next Transpile Modules. To that, run the command:
npm i next-transpile-modules
And in your next.config.js add:
const withTM = require("next-transpile-modules")([
"@primal/state",
"@primal/theme",
"@primal/primitives",
])
module.exports = withTM({})
After that your project should be able to use our amazing primitives building blocks (hoooray ✨).