### Install Tailwind CSS Dependencies
Source: https://github.com/aryansh1520/aceternity_guide/blob/main/README.md
Installs Tailwind CSS and its associated PostCSS plugins (autoprefixer) as development dependencies. These are essential for styling with Tailwind CSS.
```bash
npm install -D tailwindcss postcss autoprefixer
```
--------------------------------
### Install React Router
Source: https://github.com/aryansh1520/aceternity_guide/blob/main/README.md
Installs the `react-router-dom` package, which is necessary for client-side routing in React applications. This allows for navigation between different views without full page reloads.
```bash
npm install react-router-dom
```
--------------------------------
### Initialize Tailwind CSS
Source: https://github.com/aryansh1520/aceternity_guide/blob/main/README.md
Generates the `tailwind.config.js` and `postcss.config.js` configuration files. These files are crucial for customizing Tailwind CSS and integrating it with PostCSS.
```bash
npx tailwindcss init -p
```
--------------------------------
### Create React App
Source: https://github.com/aryansh1520/aceternity_guide/blob/main/README.md
Initializes a new React application using Create React App. This command sets up the basic project structure and necessary build tools.
```bash
npx create-react-app my-app
```
--------------------------------
### Configure React Router in index.js
Source: https://github.com/aryansh1520/aceternity_guide/blob/main/README.md
Updates the `index.js` file to wrap the main `App` component with `BrowserRouter`. This enables routing capabilities throughout the application.
```javascript
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import { BrowserRouter } from 'react-router-dom';
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
);
```
--------------------------------
### Use Helper Utilities for Color and Randomization
Source: https://context7.com/aryansh1520/aceternity_guide/llms.txt
Utility functions for converting hex colors to RGB and generating arrays of random numbers. These are primarily used for dynamic styling and data-driven animations.
```javascript
import { hexToRgb, genRandomNumbers } from "./utils/helpers";
// Convert hex color to RGB object
const rgb = hexToRgb("#06b6d4");
console.log(rgb);
// => { r: 6, g: 182, b: 212 }
// Use RGB values for dynamic styling
const dynamicColor = (t) => `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${1 - t})`;
// Generate array of random numbers
const randomIndices = genRandomNumbers(0, 100, 10);
console.log(randomIndices);
// => [23, 67, 12, 89, 45, 3, 78, 56, 91, 34] (10 random numbers between 0-100)
// Use for random selection in animations
const colors = ["#06b6d4", "#3b82f6", "#6366f1"];
const arcData = randomIndices.map((index, i) => ({
id: i,
color: colors[index % colors.length],
}));
```
--------------------------------
### Implement Animated Input Component
Source: https://context7.com/aryansh1520/aceternity_guide/llms.txt
An enhanced input component featuring a cursor-following glowing hover effect. It is built using shadcn/ui patterns and integrates with Framer Motion for smooth interactions.
```jsx
import { Input } from "./components/ui/input";
function InputDemo() {
return (
);
}
```
--------------------------------
### Implement FlipWords Rotation in React
Source: https://context7.com/aryansh1520/aceternity_guide/llms.txt
A component that cycles through an array of words with a flip animation effect. It is ideal for dynamic headlines and hero sections.
```jsx
import { FlipWords } from "./components/ui/flip-words";
function FlipWordsDemo() {
const words = ["better", "faster", "modern", "beautiful"];
return (
Build
websites with Aceternity UI
);
}
```
--------------------------------
### Create cn.js Utility Function
Source: https://github.com/aryansh1520/aceternity_guide/blob/main/README.md
Creates a utility function `cn.js` that merges CSS class names using `clsx` and `tailwind-merge`. This is useful for conditionally applying classes and resolving conflicts.
```javascript
import clsx from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs) {
return twMerge(clsx(...inputs));
}
```
--------------------------------
### Implement 3D Interactive Cards
Source: https://context7.com/aryansh1520/aceternity_guide/llms.txt
These components create an interactive 3D card effect that responds to mouse movement using CSS perspective transforms. It requires the CardContainer, CardBody, and CardItem components.
```jsx
import { CardContainer, CardBody, CardItem } from "./components/ui/3d-card";
import { Link } from "react-router-dom";
function ThreeDCardDemo() {
return (
Make things float in air
Hover over this card to unleash the power of CSS perspective
Try now →
Sign up
);
}
```
--------------------------------
### Implement InfiniteMovingCards Carousel in React
Source: https://context7.com/aryansh1520/aceternity_guide/llms.txt
An infinite scrolling carousel component for images or quotes. It supports configurable scroll direction, speed, and pause-on-hover functionality.
```jsx
import { InfiniteMovingCards } from "./components/ui/infinite-moving-cards";
function InfiniteMovingCardsDemo() {
const testimonials = [
{
image: "https://example.com/image1.jpg",
name: "Jane Doe",
title: "Product Designer",
},
{
quote: "This product changed how we work. Highly recommended!",
name: "John Smith",
title: "CTO at TechCorp",
},
{
image: "https://example.com/image2.jpg",
name: "Alice Johnson",
title: "Software Engineer",
},
];
return (
);
}
```
--------------------------------
### Create Animated Floating Navigation
Source: https://context7.com/aryansh1520/aceternity_guide/llms.txt
A floating navigation component that utilizes Framer Motion for smooth animations. It remains fixed at the top of the viewport and supports scroll-responsive behavior.
```jsx
import { FloatingNav } from "./components/ui/floating-navbar";
import { IconHome, IconUser, IconMessage } from "@tabler/icons-react";
function NavigationDemo() {
const navItems = [
{ name: "Home", link: "/", icon: },
{ name: "About", link: "/about", icon: },
{ name: "Contact", link: "/contact", icon: },
];
return (
);
}
```
--------------------------------
### Implement TextGenerateEffect Animation in React
Source: https://context7.com/aryansh1520/aceternity_guide/llms.txt
An animated text reveal component that displays words sequentially. It uses a staggered fade-in effect powered by Framer Motion.
```jsx
import { TextGenerateEffect } from "./components/ui/text-generate-effect";
function TextGenerateDemo() {
const words = "Aceternity UI brings modern animation effects to your React applications with minimal effort";
return (
);
}
```
--------------------------------
### Responsive Bento Grid Layout with React
Source: https://context7.com/aryansh1520/aceternity_guide/llms.txt
A responsive grid layout system inspired by the 'bento box' design. It supports variable column spans and includes hover effects for individual items. This component requires React and uses icons from '@tabler/icons-react'.
```jsx
import { BentoGrid, BentoGridItem } from "./components/ui/bento-grid";
import { IconClipboardCopy, IconFileBroken, IconSignature } from "@tabler/icons-react";
function BentoGridDemo() {
const Skeleton = () => (
);
const items = [
{
title: "The Dawn of Innovation",
description: "Explore the birth of groundbreaking ideas and inventions.",
header: ,
icon: ,
},
{
title: "The Digital Revolution",
description: "Dive into the transformative power of technology.",
header: ,
icon: ,
},
{
title: "The Art of Design",
description: "Discover the beauty of thoughtful and functional design.",
header: ,
icon: ,
},
];
return (
{items.map((item, i) => (
))}
);
}
```
--------------------------------
### Configure Tailwind CSS Directives
Source: https://github.com/aryansh1520/aceternity_guide/blob/main/README.md
Replaces the contents of your main CSS file (e.g., `index.css`) with Tailwind's base, components, and utilities directives. This injects Tailwind's styles into your application.
```css
@tailwind base;
@tailwind components;
@tailwind utilities;
```
--------------------------------
### Implement TracingBeam Scroll Progress in React
Source: https://context7.com/aryansh1520/aceternity_guide/llms.txt
A scroll-tracking component that renders an animated SVG beam along the side of the page. It provides visual feedback for reading progress using gradient colors.
```jsx
import { TracingBeam } from "./components/ui/tracing-beam";
function TracingBeamDemo() {
return (
Section One
Your content here. The tracing beam will follow scroll progress.
Section Two
More content with automatic scroll tracking visualization.
);
}
```
--------------------------------
### Animated Lamp Effect Component with Framer Motion
Source: https://context7.com/aryansh1520/aceternity_guide/llms.txt
A component that simulates a lamp's lighting effect using animated conic gradients. It's suitable for hero sections and landing pages, providing a dramatic visual appeal. This component utilizes Framer Motion for animations and requires React.
```jsx
import { motion } from "framer-motion";
import { LampContainer } from "./components/ui/lamp";
function LampDemo() {
return (
Build lamps
the right way
);
}
```
--------------------------------
### 3D Globe Visualization with Three.js and React
Source: https://context7.com/aryansh1520/aceternity_guide/llms.txt
An interactive 3D globe component using Three.js and react-three-fiber. It displays animated arcs between geographic points and allows for extensive customization of globe and atmosphere appearance, lighting, and animation speed. Requires React and react-three-fiber.
```jsx
import React, { Suspense } from "react";
import { motion } from "framer-motion";
import { World } from "./components/ui/globe";
function GlobeDemo() {
const globeConfig = {
pointSize: 4,
globeColor: "#062056",
showAtmosphere: true,
atmosphereColor: "#FFFFFF",
atmosphereAltitude: 0.1,
emissive: "#062056",
emissiveIntensity: 0.1,
shininess: 0.9,
polygonColor: "rgba(255,255,255,0.7)",
ambientLight: "#38bdf8",
directionalLeftLight: "#ffffff",
directionalTopLight: "#ffffff",
pointLight: "#ffffff",
arcTime: 1000,
arcLength: 0.9,
rings: 1,
maxRings: 3,
autoRotate: true,
autoRotateSpeed: 0.5,
};
const colors = ["#06b6d4", "#3b82f6", "#6366f1"];
const sampleArcs = [
{
order: 1,
startLat: -19.885592,
startLng: -43.951191,
endLat: -22.9068,
endLng: -43.1729,
arcAlt: 0.1,
color: colors[Math.floor(Math.random() * colors.length)],
},
{
order: 2,
startLat: 40.7128,
startLng: -74.006,
endLat: 51.5074,
endLng: -0.1278,
arcAlt: 0.3,
color: colors[Math.floor(Math.random() * colors.length)],
},
];
return (
Loading...
}>
);
}
```
--------------------------------
### Implement EvervaultCard Interactive Hover Effect
Source: https://context7.com/aryansh1520/aceternity_guide/llms.txt
The EvervaultCard component creates a dynamic pattern effect that responds to mouse movement. It utilizes internal Icon components and requires a container with relative positioning to function correctly.
```jsx
import { EvervaultCard, Icon } from "./components/ui/evervault-card";
function EvervaultCardDemo() {
return (
Hover over this card to see the magic
);
}
```
--------------------------------
### Configure Tailwind CSS Content Paths
Source: https://github.com/aryansh1520/aceternity_guide/blob/main/README.md
Configures the `tailwind.config.js` file to specify the paths to your template files. This allows Tailwind CSS to scan your project for class names and generate the necessary CSS.
```javascript
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./app/**/*.{js,ts,jsx,tsx,mdx}",
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
// Or if using `src` directory:
"./src/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {},
},
plugins: [],
};
```
--------------------------------
### Implement SparklesCore Particle Effect in React
Source: https://context7.com/aryansh1520/aceternity_guide/llms.txt
A particle system component using tsparticles to create animated sparkle effects. It is fully customizable with properties for color, density, size, and animation speed.
```jsx
import { SparklesCore } from "./components/ui/sparkles";
function SparklesDemo() {
return (
);
}
```
--------------------------------
### Create 3D PinContainer Effect
Source: https://context7.com/aryansh1520/aceternity_guide/llms.txt
The PinContainer component provides a 3D perspective effect for product showcases. It wraps content in a container that animates on hover, typically used for links or interactive cards.
```jsx
import { PinContainer } from "./components/ui/3d-pin";
function PinDemo() {
return (
Aceternity UI
Customizable Tailwind CSS components for modern web applications.
);
}
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.