Installation

Follow these steps to install and set up Aviris in your project.

1. Install CLI Tool

First, install the Aviris CLI globally:

npm install -g aviris-cli

2. Configure Tailwind CSS

Add the following configuration to your tailwind.config.js:

/** @type {import('tailwindcss').Config} */
module.exports = {
  darkMode: ["class"],
  content: [
    "./pages/**/*.{js,ts,jsx,tsx}",
    "./components/**/*.{js,ts,jsx,tsx}",
    "./app/**/*.{js,ts,jsx,tsx}",
  ],
  plugins: [
    require("tailwindcss-animate")
  ],
}

3. Add Components

Use the CLI to add components to your project:

npx aviris add custom-button

This will copy the component files to your project and install any required dependencies automatically.

4. Usage

Import and use components in your code:

import { CustomButton } from "@/components/custom/CustomButton";

export default function MyComponent() {
  return <CustomButton>Click me</CustomButton>;
}

Requirements

  • React 18 or higher
  • Next.js 13 or higher
  • Node.js 16.8 or higher
  • TailwindCSS 3.3 or higher