### Initialize Astro project with npm
Source: https://buouui.com/docs/installation/astro
Runs the Astro starter installer via npm to create a new project. No additional dependencies required. Executes in a terminal.
```bash
npm create astro@latest
```
--------------------------------
### Create Next.js Project with TypeScript and Tailwind
Source: https://buouui.com/docs/installation/next
Initializes a new Next.js application with TypeScript, Tailwind CSS, and ESLint support. Requires Node.js and npm to be installed.
```bash
npx create-next-app@latest my-app --typescript --tailwind --eslint
```
--------------------------------
### Install icon library for default style
Source: https://buouui.com/docs/installation/manual
Installs the Lucide React icon library, required if using the 'default' style in BuouUI. Provides a set of customizable icons.
```bash
npm install lucide-react
```
--------------------------------
### Project Structure Overview
Source: https://buouui.com/docs/installation/next
Displays the recommended directory structure for a Next.js project using BuouUI. Organizes components, utilities, and styles into separate folders.
```text
.
├── app
│ ├── layout.tsx
│ └── page.tsx
├── components
│ ├── eldoraui
│ │ ├── alert-dialog.tsx
│ │ ├── button.tsx
│ │ ├── dropdown-menu.tsx
│ │ └── ...
│ ├── navbar.tsx
│ ├── header.tsx
│ └── ...
├── lib
│ └── utils.ts
├── styles
│ └── globals.css
├── next.config.js
├── package.json
├── postcss.config.js
├── tailwind.config.js
└── tsconfig.json
```
--------------------------------
### Add Tailwind CSS integration to Astro project
Source: https://buouui.com/docs/installation/astro
Installs Tailwind CSS via Astro's CLI, setting up required configuration files for utility-first styling. Requires Node.
```bash
npx astro add tailwind
```
--------------------------------
### Initialize Shadcn-UI CLI
Source: https://buouui.com/docs/installation/laravel
Command to run the shadcn-ui CLI initialization process. This command starts the interactive setup for integrating shadcn-ui into the project.
```bash
npx shadcn-ui@latest init
```
--------------------------------
### Install icon library for new-york style
Source: https://buouui.com/docs/installation/manual
Installs the Radix UI React icons, required if using the 'new-york' style in BuouUI. Offers a different set of icons for this style variant.
```bash
npm install @radix-ui/react-icons
```
--------------------------------
### Install dependencies with npm
Source: https://buouui.com/docs/installation/manual
Installs required dependencies for BuouUI including Tailwind CSS utilities and animation plugins. This is necessary for styling and functionality.
```bash
npm install tailwindcss-animate class-variance-authority clsx tailwind-merge
```
--------------------------------
### Add React integration to Astro project
Source: https://buouui.com/docs/installation/astro
Installs the React integration using Astro's CLI, enabling usage of React components within Astro pages. Requires a Node environment.
```bash
npx astro add react
```
--------------------------------
### Import and use Button component in Astro page
Source: https://buouui.com/docs/installation/astro
Demonstrates importing the Button component and rendering it within an Astro page, showing typical HTML structure with Astro frontmatter.
```astro
---
import { Button } from "@/components/ui/button"
---
Astro
```
--------------------------------
### Create Remix Project (Shell)
Source: https://buouui.com/docs/installation/remix
This command creates a new Remix project. It uses `npx` to execute the `create-remix` package without installing it globally. The project will be created in a directory called 'my-app'.
```shell
npx create-remix@latest my-app
```
--------------------------------
### Configure Tailwind CSS
Source: https://buouui.com/docs/installation/manual
Tailwind CSS configuration file for BuouUI. Includes custom themes, colors, animations, and plugin setup for dark mode and animations.
```javascript
const { fontFamily } = require("tailwindcss/defaultTheme");
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: ["class"],
content: ["app/**/*.{ts,tsx}", "components/**/*.{ts,tsx}"],
theme: {
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
extend: {
colors: {
border: "hsl(var(--border))",
input: "hsl(var(--input))",
ring: "hsl(var(--ring))",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
primary: {
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
},
secondary: {
DEFAULT: "hsl(var(--secondary))",
foreground: "hsl(var(--secondary-foreground))",
},
destructive: {
DEFAULT: "hsl(var(--destructive))",
foreground: "hsl(var(--destructive-foreground))",
},
muted: {
DEFAULT: "hsl(var(--muted))",
foreground: "hsl(var(--muted-foreground))",
},
accent: {
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
},
popover: {
DEFAULT: "hsl(var(--popover))",
foreground: "hsl(var(--popover-foreground))",
},
card: {
DEFAULT: "hsl(var(--card))",
foreground: "hsl(var(--card-foreground))",
},
},
borderRadius: {
lg: `var(--radius)`,
md: `calc(var(--radius) - 2px)`,
sm: "calc(var(--radius) - 4px)",
},
fontFamily: {
sans: ["var(--font-sans)", ...fontFamily.sans],
},
keyframes: {
"accordion-down": {
from: { height: "0" },
to: { height: "var(--radix-accordion-content-height)" },
},
"accordion-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: "0" },
},
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
},
},
},
plugins: [require("tailwindcss-animate")],
};
```
--------------------------------
### Install Tailwind CSS (Shell)
Source: https://buouui.com/docs/installation/remix
This command installs Tailwind CSS and Autoprefixer as development dependencies in your project. These tools are essential for styling the application with Tailwind's utility-first approach.
```shell
npm add -D tailwindcss@latest autoprefixer@latest
```
--------------------------------
### Import globals.css in Astro page
Source: https://buouui.com/docs/installation/astro
Adds an import statement in the page frontmatter to include the global stylesheet. Place this at the top of a .astro file.
```astro
---
import '@/styles/globals.css'
---
```
--------------------------------
### Install Dependencies for Animated Tabs
Source: https://buouui.com/docs/animations/animated-tabs
Installs necessary dependencies, framer-motion for animations and lucide-react for icons, using npm.
```bash
npm install framer-motion lucide-react
```
--------------------------------
### Configure Global Styles with CSS Variables (globals.css)
Source: https://buouui.com/docs/installation/manual
This CSS file configures global styles for the project using Tailwind CSS and CSS variables for theming. It defines color palettes and spacing for both light and dark modes, ensuring a consistent look and feel. It also applies base styles to all elements and the body.
```css
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 47.4% 11.2%;
--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;
--popover: 0 0% 100%;
--popover-foreground: 222.2 47.4% 11.2%;
--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;
--card: 0 0% 100%;
--card-foreground: 222.2 47.4% 11.2%;
--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;
--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;
--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;
--destructive: 0 100% 50%;
--destructive-foreground: 210 40% 98%;
--ring: 215 20.2% 65.1%;
--radius: 0.5rem;
}
.dark {
--background: 224 71% 4%;
--foreground: 213 31% 91%;
--muted: 223 47% 11%;
--muted-foreground: 215.4 16.3% 56.9%;
--accent: 216 34% 17%;
--accent-foreground: 210 40% 98%;
--popover: 224 71% 4%;
--popover-foreground: 215 20.2% 65.1%;
--border: 216 34% 17%;
--input: 216 34% 17%;
--card: 224 71% 4%;
--card-foreground: 213 31% 91%;
--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 1.2%;
--secondary: 222.2 47.4% 11.2%;
--secondary-foreground: 210 40% 98%;
--destructive: 0 63% 31%;
--destructive-foreground: 210 40% 98%;
--ring: 216 34% 17%;
--radius: 0.5rem;
}
}
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
font-feature-settings:
"rlig" 1,
"calt" 1;
}
}
```
--------------------------------
### Install Dependencies for BuouUI Components
Source: https://buouui.com/docs/introduction
Installs the necessary development dependencies for BuouUI Components, including utility libraries for class merging and animations. Ensure you have npm or a compatible package manager installed.
```bash
npm install -D clsx tailwind-merge framer-motion lucide-react
```
--------------------------------
### Install Dependencies for Fliping Counter
Source: https://buouui.com/docs/animations/fliping-counter
Installs the 'styled-components' dependency required for the Fliping Counter component. This is a crucial step before integrating the component into your project.
```bash
npm install styled-components
```
--------------------------------
### Install shadcn/ui Components
Source: https://buouui.com/docs/animations/event-calendar
Installs specific shadcn/ui components like 'chart' and 'toast' using the shadcn CLI.
```bash
npx shadcn@latest add chart toast
```
--------------------------------
### Install BuouUI Dependencies
Source: https://buouui.com/docs/animations/button-link
Installs the required dependencies for BuouUI components using npm. This includes packages from Radix UI and class-variance-authority.
```bash
npm install @radix-ui/react-slot class-variance-authority @radix-ui/react-icons
```
--------------------------------
### Floating Dock Usage Example
Source: https://buouui.com/docs/animations/dock
Demonstrates how to use the FloatingDock component with a list of navigation links, including icons and URLs. It shows how to set up the component within a div for centering and provides example props for mobile responsiveness.
```jsx
const links = [
{
title: "Twitter",
icon: (
),
href: "https://x.com/bean921112",
},
{
title: "GitHub",
icon: (
),
href: "https://github.com/buoooou",
},
]
export default function Demo() {
return (
)
}
```
--------------------------------
### Install Music Card Dependencies (npm)
Source: https://buouui.com/docs/animations/music-card
Installs the necessary dependencies for the Music Card component, including framer-motion for animations and Radix UI Slider for interactive elements.
```bash
npm install framer-motion @radix-ui/react-slider
```
--------------------------------
### Configure path aliases in tsconfig.json
Source: https://buouui.com/docs/installation/manual
Sets up path aliases in TypeScript configuration to simplify imports. Uses '@' as the base alias but can be customized.
```json
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./*"]
}
}
}
```
--------------------------------
### Update Tailwind content paths in tailwind.config.mjs
Source: https://buouui.com/docs/installation/astro
Exports Tailwind configuration with a content glob that matches Astro and other file types, ensuring Tailwind scans the correct files.
```javascript
export default {
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
}
```
--------------------------------
### Install Dependencies for Floating Dock
Source: https://buouui.com/docs/animations/dock
Installs necessary npm packages like framer-motion and class-variance-authority, and shadcn/ui components such as tooltip, button, and separator for the Floating Dock.
```bash
npm install framer-motion class-variance-authority
npx shadcn@latest add tooltip button separator
```
--------------------------------
### Gallery Card Usage Example in TSX
Source: https://buouui.com/docs/animations/gallery
Example demonstrating the usage of PhotoGalleryWithThumbs component to render a gallery with images, autoplay enabled, and a delay. Depends on BuouUI components and images array. Input: images prop as ImageData[], autoplay boolean, autoplayDelay number. Output: JSX for the gallery card. Requires proper import of the component and data setup.
```tsx
export default function Demo() {
return (
)
}
```
--------------------------------
### Install BuouUI Levitate Dependencies
Source: https://buouui.com/docs/animations/levitate
Command to install required shadcn/ui components for the Levitate functionality. This installs avatar and card components that are dependencies for the BuouUI Levitate component.
```bash
npx shadcn@latest add avatar card
```
--------------------------------
### Initialize Gatsby Project with BuouUI
Source: https://buouui.com/docs/installation/gatsby
Command to create a new Gatsby project using the official CLI tool. This initializes a fresh Gatsby site ready for BuouUI integration with TypeScript and Tailwind CSS support.
```bash
npm init gatsby
```
--------------------------------
### Install Shadcn/ui Dependencies
Source: https://buouui.com/docs/animations/fold-card
This command installs the necessary shadcn/ui components, such as card, input, and label, which are required for the Fold Card functionality.
```bash
npx shadcn@latest add card input label
```
--------------------------------
### Install Dependencies for Flickering Grid
Source: https://buouui.com/docs/animations/flickering-grid
Installs the required color-bits package for color manipulation in the Flickering Grid component.
```bash
npm install color-bits
```
--------------------------------
### Install swapy and shadcn/ui dependencies
Source: https://buouui.com/docs/animations/swapy-card
Install the swapy library for card resizing functionality and add shadcn/ui card component dependencies to your project. These packages provide the core resizing capabilities and UI components.
```shell
npm install swapy
```
```shell
npx shadcn@latest add card
```
--------------------------------
### React LiquidGlass Component Usage Example
Source: https://buouui.com/docs/animations/apple-liquid-glass
Demonstrates how to integrate the LiquidGlass component into a React application. The example shows a full-screen demo layout with background image, centered glass element, and responsive container setup. Requires React environment with Tailwind CSS for styling. The component is rendered with default props within a background-themed container.
```react
export default function Demo() {
return (
Apple Liquid Glass
Move the glass to see the effect
)
}
```
--------------------------------
### CountdownTimer Component Usage
Source: https://buouui.com/docs/animations/countdown-timer
Example of how to use the CountdownTimer component. It accepts initialMinutes and initialSeconds props to set the countdown duration. The component automatically handles formatting and starting the timer.
```jsx
import CountdownTimer from "@/components/countdown-timer";
// 5 minute countdown
// 2 minutes and 30 seconds countdown
```
--------------------------------
### Install shadcn/ui components
Source: https://buouui.com/docs/animations/scrolling
Installs required shadcn/ui components including card, button, input, and label. These are UI building blocks for the screen scrolling interface.
```bash
npx shadcn@latest add card button input label
```
--------------------------------
### Usage Example: Particle Digital Clock in React
Source: https://buouui.com/docs/animations/particle-clock
Demonstrates how to integrate the ParticleClock component into a React application. It shows the basic setup for displaying the clock within a full-screen div.
```javascript
export default function ClockPage() {
return (
);
}
```
--------------------------------
### Install Dependencies for BuouUI Components
Source: https://buouui.com/docs/animations/github-button
Installs the required npm packages for using BuouUI components. These include radix-ui components and class-variance-authority for styling.
```bash
npm install @radix-ui/react-dropdown-menu @radix-ui/react-slot class-variance-authority
```
--------------------------------
### Install Kanban Board Card Dependencies (npm)
Source: https://buouui.com/docs/animations/kanban-board-card
Installs the necessary dnd-kit and radix-ui packages required for the Kanban Board Card functionality. These are essential for drag-and-drop and UI element rendering.
```bash
npm install @dnd-kit/core @dnd-kit/sortable @dnd-kit/utilities @radix-ui/react-slot
```
--------------------------------
### Install framer-motion Dependency
Source: https://buouui.com/docs/animations/bubble
This snippet shows the command to install the 'framer-motion' dependency, which is required for the Floating Bubble Background component.
```bash
npm install framer-motion
```
--------------------------------
### Install shadcn/ui Components (npx)
Source: https://buouui.com/docs/animations/kanban-board-card
Installs specific shadcn/ui components like 'badge' and 'button' which are used for styling the Kanban Board Card and related elements. Ensure these components are available in your project.
```bash
npx shadcn@latest add badge button
```
--------------------------------
### Install Swapy Dependency
Source: https://buouui.com/docs/animations/swapy
Installs the Swapy library, which is required for the Reorder Card component's functionality. This is typically done using a package manager like npm.
```bash
npm install swapy
```
--------------------------------
### Avatar List Component Usage Example (React/JSX)
Source: https://buouui.com/docs/animations/avatar-list
This React component demonstrates the usage of the AvatarList component from BuouUI. It accepts 'size' and 'className' props to customize its appearance and layout. Ensure the AvatarList component and its dependencies are correctly installed.
```jsx
export function AvatarListDemo() {
return
}
```
--------------------------------
### Import and Use Shadcn-UI Button Component (React)
Source: https://buouui.com/docs/installation/laravel
Example of how to import and use the shadcn-ui Button component within a React functional component. It demonstrates basic usage by rendering a button with the text 'Click me'.
```javascript
import { Button } from "@/Components/ui/button"
export default function Home() {
return (
)
}
```
--------------------------------
### Install Tailwind CSS and PostCSS
Source: https://buouui.com/docs/installation/vite
Installs Tailwind CSS, PostCSS, and Autoprefixer as development dependencies. It also generates the necessary configuration files for Tailwind CSS.
```bash
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
```
--------------------------------
### Configure Astro Tailwind integration to disable base styles
Source: https://buouui.com/docs/installation/astro
Sets applyBaseStyles to false in Astro's Tailwind integration to prevent duplicate base styles. Add this configuration to astro.config.mjs.
```javascript
export default defineConfig({
integrations: [
tailwind({
applyBaseStyles: false,
}),
],
})
```
--------------------------------
### Install shadcn/ui Button Dependency
Source: https://buouui.com/docs/animations/stepper
Command to install the shadcn/ui Button component. This is a prerequisite for using certain UI elements that may integrate with the stepper.
```bash
npx shadcn@latest add button
```
--------------------------------
### Create Laravel Project with Inertia and React
Source: https://buouui.com/docs/installation/laravel
Command to create a new Laravel project with Inertia, React, TypeScript, Breeze, Git integration, and no user interaction. This sets up the basic project structure.
```bash
laravel new my-app --typescript --breeze --stack=react --git --no-interaction
```
--------------------------------
### Install shadcn/ui Button Component - npx
Source: https://buouui.com/docs/animations/button
This command uses `npx` to install the Button component from shadcn/ui, which is a prerequisite for the Confetti Button implementation.
```bash
npx shadcn@latest add button
```
--------------------------------
### Install Dependencies for Animation Card Input
Source: https://buouui.com/docs/animations/card-input
Installs the necessary npm packages for the Animation Card Input component, including react-payment-inputs, @radix-ui/react-label, and class-variance-authority.
```bash
npm install react-payment-inputs @radix-ui/react-label class-variance-authority
```
--------------------------------
### Install Dependencies for Button Border Trail
Source: https://buouui.com/docs/animations/button-trail
Installs the necessary npm packages, @radix-ui/react-slot and class-variance-authority, required for the Button Border Trail component.
```bash
npm install @radix-ui/react-slot class-variance-authority
```
--------------------------------
### Install BuouUI Dependencies
Source: https://buouui.com/docs/animations/event-calendar
Installs the necessary npm packages for the Bill Calendar component, including radix-ui/react-tooltip, framer-motion, date-fns, react-day-picker, and recharts.
```bash
npm install @radix-ui/react-tooltip framer-motion date-fns react-day-picker recharts
```
--------------------------------
### 3D Visual Card Usage Example (React)
Source: https://buouui.com/docs/animations/3d-visual-card
An example demonstrating how to use the 3D Visual Card component in a React application. It showcases how to pass various props like width, height, header, footer, and children to customize the card's appearance and behavior. Dependencies include React and the BuouUI VisualContainer component.
```jsx
export default function Demo() {
return (
{/* 3D container with custom settings */}
Interactive 3D Container}
footer={
Hover over elements to see 3D effect
}
children={[
Box 1
,
Box 2
]}
/>
);
}
```
--------------------------------
### Install Canvas-Confetti Dependency - npm
Source: https://buouui.com/docs/animations/button
This command installs the `canvas-confetti` npm package, which is a required dependency for the Confetti Button functionality.
```bash
npm install canvas-confetti
```
--------------------------------
### Installing Dependencies for Bento Grid
Source: https://buouui.com/docs/animations/bento-grid
Install required packages for animations and icons using npm, followed by adding Shadcn/UI button component. This sets up Framer Motion for animations and Radix UI icons. Inputs are package names; outputs updated node_modules. Requires Node.js and npm.
```bash
npm install framer-motion @radix-ui/react-icons
npx shadcn@latest add button
```
--------------------------------
### Add Shadcn-UI Component (TypeScript)
Source: https://buouui.com/docs/installation/remix
This command adds a `Button` component to the project using the `shadcn-ui` CLI. It then imports and uses the component within the `Home` function component.
```typescript
npx shadcn-ui@latest add button
```
```typescript
import { Button } from "~/components/ui/button"
export default function Home() {
return (
)
}
```
--------------------------------
### Reorder Card Usage Example
Source: https://buouui.com/docs/animations/swapy
Demonstrates how to use the Reorder Card component in a React application. It shows the basic structure for rendering the component and passing a required prop for animation.
```jsx
export default function Swapy() {
return ;
}
```
--------------------------------
### Install BuouUI Password Input Dependencies
Source: https://buouui.com/docs/animations/password-input
This command installs the necessary dependencies for the Animation Password Input component. The component requires class-variance-authority for styling and @radix-ui/react-label for accessible labeling.
```bash
npm install class-variance-authority @radix-ui/react-label
```
--------------------------------
### Installing Dependencies for 3D Event Badge
Source: https://buouui.com/docs/animations/3d-badge
Install required packages for the 3D event badge component using npm. This includes Three.js and React Three Fiber libraries for 3D rendering. No inputs or outputs specified; run in project root. Limitations: Requires Node.js and npm installed.
```bash
npm install three meshline @react-three/rapier @react-three/drei @react-three/fiber
```
--------------------------------
### Add Shadcn-UI Button Component
Source: https://buouui.com/docs/installation/laravel
Command to add the 'button' component from shadcn-ui to the project. This command fetches and integrates the specific component's code.
```bash
npx shadcn-ui@latest add button
```
--------------------------------
### Remix Configuration (JavaScript)
Source: https://buouui.com/docs/installation/remix
This code adds Tailwind and PostCSS support to the Remix configuration. This enables Remix to process and incorporate Tailwind's styles into the application.
```javascript
/** @type {import('@remix-run/dev').AppConfig} */
export default {
...
tailwind: true,
postcss: true,
...
};
```
--------------------------------
### Matrix Text Usage Example
Source: https://buouui.com/docs/animations/matrix-text
Demonstrates how to import and use the MatrixText component in a React application.
```APIDOC
## Matrix Text Usage
### Description
Example code showing how to import and render the MatrixText component with custom props.
### Method
N/A (Component Usage)
### Endpoint
N/A (Component Usage)
### Parameters
N/A (Component Usage)
### Request Example
```jsx
import MatrixText from "@/components/matrix-text";
export default function Demo() {
return (
);
}
```
### Response
N/A (Component Usage)
```
--------------------------------
### Usage Example
Source: https://buouui.com/docs/animations/fireworks
Demonstrates how to integrate the Firework component into a React application.
```APIDOC
## Usage
### Description
Example of how to use the Firework component in a React application.
### Method
```javascript
import React from 'react';
import { FireworksProvider, FireworksCanvas } from 'your-firework-library'; // Replace with actual import path
export default function Demo() {
return (
);
}
```
### Endpoint
- Not applicable (Code example)
### Parameters
- Not applicable (Code example)
### Request Example
```javascript
// See Method section for the code example.
```
### Response
#### Success Response (200)
- The rendered firework effect on the canvas within the specified div.
#### Response Example
```html
```
```
--------------------------------
### PostCSS Configuration (JavaScript)
Source: https://buouui.com/docs/installation/remix
This code creates a `postcss.config.js` file that configures PostCSS to use Tailwind CSS and Autoprefixer. PostCSS processes the CSS files and applies Tailwind's directives, ensuring styles are generated correctly.
```javascript
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
```
--------------------------------
### Fliping Counter Component Usage Example
Source: https://buouui.com/docs/animations/fliping-counter
Demonstrates how to use the FlipingCounter component within a React application. It shows the basic structure for rendering the counter in a full-screen div.
```javascript
export default function Demo() {
return (
);
}
```
--------------------------------
### Install Dependencies for Pixel Background
Source: https://buouui.com/docs/animations/pixel
Installs required npm packages including three.js and react-three-fiber for creating 3D graphics and animations in the Pixel Background component. These dependencies enable WebGL rendering and 3D dot matrix effects.
```bash
npm install three @react-three/fiber
```
--------------------------------
### Import Tailwind CSS (TypeScript)
Source: https://buouui.com/docs/installation/remix
This code imports the `tailwind.css` file within the `app/root.tsx` file and adds it as a stylesheet link. This ensures that Tailwind's base styles and any custom styles are applied to the entire application.
```typescript
import styles from "./tailwind.css"
export const links: LinksFunction = () => [
{ rel: "stylesheet", href: styles },
...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []),
]
```
--------------------------------
### Code Folder Component Usage Example
Source: https://buouui.com/docs/animations/code-floder
Demonstrates how to use the Code Folder component by defining a directory structure and passing it as the 'data' prop. Includes optional 'containerClassName' for styling.
```typescript
import CodeFloder from "@/components/ui/code-floder";
// Define your directory structure
const myProjectData = [
{
name: "my-awesome-app",
githubUrl: "https://github.com/user/my-awesome-app",
children: [
{
name: "src",
children: [
{ name: "components", children: [{ name: "Button.tsx" }] },
{ name: "app", children: [{ name: "page.tsx" }] },
]
},
{ name: "node_modules", isLocked: true },
{ name: "package.json" },
],
},
];
export default function MyPage() {
return (
);
}
```
--------------------------------
### Counter Card Usage Example
Source: https://buouui.com/docs/animations/counter-card
Demonstrates how to use the Counter Card component within a React application. It shows how to set the target value and format the displayed number.
```typescript
export function CounterCard() {
return (
+Math.ceil(v) + "k+ Users"} />
)
}
```
--------------------------------
### Grid Component Usage Example (React)
Source: https://buouui.com/docs/animations/animated-grid
This React component demonstrates how to use the `GridDemo` component, likely a part of BuouUI. It renders a `InteractiveGrid` with the gradient option disabled and includes a simple div inside it. This example shows basic integration with the Grid component.
```javascript
export function GridDemo() {
return (
)
}
```
--------------------------------
### MatrixText Component Usage Example
Source: https://buouui.com/docs/animations/matrix-text
This React component demonstrates how to use the MatrixText component from '@/components/matrix-text'. It shows how to import and render the component with custom props for text content, initial delay, animation duration, and letter interval.
```javascript
import MatrixText from "@/components/matrix-text";
export default function Demo() {
return (
);
}
```
--------------------------------
### Flickering Grid Component Usage Example
Source: https://buouui.com/docs/animations/flickering-grid
Demonstrates how to use the FlickeringGrid component in a React application with various props for customization.
```javascript
export default function HeroSection() {
return (
Your content here
);
}
```
--------------------------------
### Usage Example - React
Source: https://buouui.com/docs/animations/grid
Demonstrates how to use the `InteractiveGrid` component, likely a part of the Grid Background functionality. It shows rendering a simple div within the grid and disabling the gradient effect.
```jsx
export function GridDemo() {
return (
)
}
```
--------------------------------
### GET /animations-stepper
Source: https://buouui.com/docs/animations/stepper
Retrieves the configuration schema for the Animations Stepper component, describing required and optional props for rendering the stepper UI.
```APIDOC
## GET /animations-stepper
### Description
The Animations Stepper component provides a multi-step UI with customizable labels, values, and SVG icons.
### Method
GET
### Endpoint
/animations-stepper
### Parameters
#### Path Parameters
_None_
#### Query Parameters
_None_
#### Request Body
- **label** (string) - Required - The step label.
- **value** (string) - Required - The step value.
- **stepSvg** (ReactNode) - Optional - The step SVG icon.
### Request Example
{
"label": "Step 1",
"value": "step1",
"stepSvg": ""
}
### Response
#### Success Response (200)
- **status** (string) - Operation successful.
- **component** (object) - Rendered component details.
### Response Example
{
"status": "success",
"component": {
"label": "Step 1",
"value": "step1"
}
}
```
--------------------------------
### Usage example for LED Card in React TypeScript
Source: https://buouui.com/docs/animations/led
This code demonstrates using the LEDBoard component to display a word as an animated LED card. It exports a function that returns the component with a word prop. Requires the LEDBoard component; inputs a string word and outputs a React element with animation.
```TypeScript
export function Led() {
return
}
```
--------------------------------
### Install `cn` Utility for BuouUI
Source: https://buouui.com/docs/animations/ads
This snippet shows the installation of the `cn` utility function, which is essential for merging CSS class names efficiently in your project. It relies on `clsx` for class name manipulation and `tailwind-merge` for Tailwind CSS class name management.
```typescript
import { ClassValue, clsx } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
```
--------------------------------
### Animated Tabs Usage Example
Source: https://buouui.com/docs/animations/animated-tabs
Demonstrates how to use the AnimatedTabs component within a React page. Includes a handler for search functionality and shows how to pass custom props like className and activeColor.
```typescript
export default function MyPage() {
const handleSearch = (value: string) => {
console.log("Searching for:", value);
};
return (
);
}
```
--------------------------------
### Fliping Text Component Usage Example
Source: https://buouui.com/docs/animations/fliping-text
Demonstrates how to use the Fliping Text component to display a list of words that animate one after another. It sets up a container and uses the FlipWords component with a predefined array of words.
```typescript
export function FlipWordsDemo() {
const words = ["Super", "Smooth", "Beautiful", "Modern"]
return (
Build
Website using BuouUI
)
}
```
--------------------------------
### Configure Tailwind CSS for Shadcn-UI (JavaScript/TypeScript)
Source: https://buouui.com/docs/installation/laravel
Configuration for `tailwind.config.js` to integrate with shadcn-ui. It defines content paths, theme settings including custom colors and radii, keyframes for animations like accordion, and plugins.
```javascript
import forms from "@tailwindcss/forms"
import defaultTheme from "tailwindcss/defaultTheme"
/** @type {import('tailwindcss').Config} */
export default {
darkMode: "class",
content: [
"./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php",
"./storage/framework/views/*.php",
"./resources/views/**/*.blade.php",
"./resources/js/**/*.tsx",
],
theme: {
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
extend: {
colors: {
border: "hsl(var(--border))",
input: "hsl(var(--input))",
ring: "hsl(var(--ring))",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
primary: {
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
},
secondary: {
DEFAULT: "hsl(var(--secondary))",
foreground: "hsl(var(--secondary-foreground))",
},
destructive: {
DEFAULT: "hsl(var(--destructive))",
foreground: "hsl(var(--destructive-foreground))",
},
muted: {
DEFAULT: "hsl(var(--muted))",
foreground: "hsl(var(--muted-foreground))",
},
accent: {
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
},
popover: {
DEFAULT: "hsl(var(--popover))",
foreground: "hsl(var(--popover-foreground))",
},
card: {
DEFAULT: "hsl(var(--card))",
foreground: "hsl(var(--card-foreground))",
},
},
borderRadius: {
lg: `var(--radius)`,
md: `calc(var(--radius) - 2px)`,
sm: "calc(var(--radius) - 4px)",
},
fontFamily: {
sans: ["Figtree", ...defaultTheme.fontFamily.sans],
},
keyframes: {
"accordion-down": {
from: { height: 0 },
to: { height: "var(--radix-accordion-content-height)" },
},
"accordion-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: 0 },
},
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
},
},
},
plugins: [forms, require("tailwindcss-animate")],
}
```
--------------------------------
### React Usage Example for Fade In and Out Component
Source: https://buouui.com/docs/animations/fade-in-out
Demonstrates how to use the Fade In and Out component in a React application. It shows how to pass text, custom class names, and transition durations as props.
```jsx
export default function Demo() {
return (
)
};
```
--------------------------------
### Usage Example for IPhone Color Background
Source: https://buouui.com/docs/animations/color-bg
This React code snippet demonstrates how to use the IPhone Color Background component within a Next.js application. It sets up a section with an animated background and content.
```jsx
export default function Demo() {
return (
Iphone color background
)
}
```
--------------------------------
### Implement Dot Background Component in React
Source: https://buouui.com/docs/animations/dot
Demonstrates basic usage of the Dot component with gradient disabled. The example shows how to render the dot pattern within a full-size container. Accepts props for color, size, spacing, and gradient configuration.
```typescript
export function DotDemo() {
return (
)
}
```
--------------------------------
### Usage: HackerBackground Demo (JavaScript)
Source: https://buouui.com/docs/animations/hacker
Demonstrates how to use the HackerBackground component within a React function component. The example creates a container div with styling and includes the HackerBackground component within it.
```javascript
export default function HackerBackgroundDemo() {
return (
)
}
```
--------------------------------
### HolographicCard with Animation and Events
Source: https://buouui.com/docs/animations/3d-reflective-card
Illustrates enabling automatic animation ('autoAnimate') and configuring event callbacks ('onHover', 'onHoverEnd') for the HolographicCard. This example also shows adjusting the 'sensitivity' prop for the 3D rotation effect.
```jsx
console.log("Card hovered")}
onHoverEnd={() => console.log("Hover ended")}
/>
```
--------------------------------
### React Usage Example for FloatingBubbles
Source: https://buouui.com/docs/animations/bubble
This React code demonstrates how to use the FloatingBubbles component within a Next.js application. It includes basic styling for the container to center the bubbles and hide overflow. The component itself is a direct child of the styled div.
```jsx
export default function Demo() {
return (
)
}
```
--------------------------------
### Render HoverEffect component with project data
Source: https://buouui.com/docs/animations/card-hover-effect
React example demonstrating how to render the HoverEffect component, passing an array of project items with title, description, and link. Shows required props and component layout.
```tsx
export default function Demo() {
return (
);
}
const projects = [
{
title: "OpenAI",
description:
"An AI research and deployment company dedicated to ensuring artificial general intelligence benefits all of humanity.",
link: "#",
},
// ... more projects
];
```
--------------------------------
### Text Drop Component Usage Example
Source: https://buouui.com/docs/animations/text-drop
This React code snippet demonstrates how to use the Text Drop component. It showcases passing the 'text', 'className', 'bounceDuration', and 'dropAnimationDuration' props to customize the component's appearance and animation.
```jsx
export default function demo() {
return (
)
};
```
--------------------------------
### Create Vite React Project
Source: https://buouui.com/docs/installation/vite
Initializes a new React project using Vite with npm. This command sets up the basic project structure and dependencies.
```bash
npm create vite@latest
```
--------------------------------
### Wave Reveal Text Example (React)
Source: https://buouui.com/docs/animations/wave-text
Demonstrates the usage of the WaveReveal component within a React application. It showcases setting various props like text, direction, mode, duration, delay, blur, className, and letterClassName to control the animation effect.
```javascript
export default function Demo() {
return (
);
}
```
--------------------------------
### Conditional Tailwind CSS Class Merging Utility (lib/utils.ts)
Source: https://buouui.com/docs/installation/manual
This TypeScript utility function, 'cn', combines multiple class names into a single string, conditionally applying them using clsx and merging duplicates or conflicting classes with tailwind-merge. It simplifies the process of managing dynamic Tailwind CSS classes in components.
```typescript
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
```
--------------------------------
### Using LanyardCard Component in React
Source: https://buouui.com/docs/animations/3d-badge
Render the LanyardCard component for displaying the 3D event badge in a React application. Props include className for styling, height for size, and backgroundColor for theme. Outputs a JSX element; depends on installed React Three Fiber packages. Limitations: Requires a React setup and downloaded 3D model.
```jsx
export default function Demo() {
return (
)
}
```
--------------------------------
### HackerBackground Component API
Source: https://buouui.com/docs/animations/hacker
Documentation for the HackerBackground component, including its available props.
```APIDOC
## HackerBackground Component API
### Description
Provides a customizable hacker background effect for your web applications.
### Props
#### Available Props
- **color** (string) - Optional - The background color of the hacker effect.
- **size** (number) - Optional - The font size for the characters in the effect.
- **speed** (number) - Optional - The speed of the animation.
- **className** (string) - Optional - Additional CSS classes to apply to the component.
```
--------------------------------
### Basic Usage of HolographicCard Component
Source: https://buouui.com/docs/animations/3d-reflective-card
Demonstrates the simplest way to use the HolographicCard component in a React application. It requires importing the component and providing the essential 'imageUrl' prop.
```javascript
import HolographicCard from "@/components/holographic-card"
export default function MyComponent() {
return (
)
}
```