Installation
How to install the library.
Before you start
Before you start, you need to have already installed the following:
- React 18 or higher
- TailwindCSS 3 or higher
How to install
To start using the library, you need to install it first. You can do that by following the instructions below
Install the theme
Let's start by installing the theme package:
npm install @andore-ui/theme
Configure Tailwind to use the theme
Next, you need to configure tailwind to use the theme, and add the components to the content array, so that tailwind can scan the components for classes.
tailwind.config.js
module.exports = {
...,
content: [
"./node_modules/@andore-ui/**/*.{js,ts,jsx,tsx}",
],
plugins: [
require('@andore-ui/theme')({}),
],
};
Start using the components!
Now you can start using the components in your project!
For example, let's import the Button component and use it in your project:
npm install @andore-ui/button
App.js
import { Button } from '@andore-ui/button';
function App() {
return (
<Button>Click me!</Button>
);
}