### Getting Started Path Steps Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/INDEX.md Outlines a step-by-step guide for new users to get started with the react-bits project, from understanding the project to implementing and customizing components. ```markdown 1. **Understand the Project** - Read [README.md](README.md) - Overview & Philosophy - Explore component categories 2. **Choose Your Component** - Browse [api-reference.md](api-reference.md) categories - Find component that matches your needs 3. **Install** - Follow [README.md](README.md#installation) instructions - Choose appropriate variant 4. **Implement** - Copy usage example from [api-reference.md](api-reference.md) - Customize props per [types.md](types.md) 5. **Customize Further (if needed)** - Use hooks from [hooks.md](hooks.md) for state - Apply utilities from [utilities.md](utilities.md) for animations 6. **Optimize** - Review [README.md](README.md#performance-considerations) - Apply best practices ``` -------------------------------- ### Clone and Run Development Environment Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/README.md Steps to set up the development environment by cloning the repository, installing dependencies, and starting the development server. ```bash git clone https://github.com/davidhdev/react-bits.git cd react-bits npm install npm run dev ``` -------------------------------- ### Generated Command Format Examples Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/hooks.md Shows the typical format for installation commands generated by the useInstallation hook, including placeholders for component name and variant. ```bash npx jsrepo add @react-bits/{ComponentName}-{Variant} npx shadcn@latest add @react-bits/{ComponentName}-{Variant} ``` -------------------------------- ### useInstallation Hook Example Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/hooks.md Demonstrates how to use the useInstallation hook to manage installation commands and variants for a component. It provides state for the selected variant, the generated command, and a copy-to-clipboard function. ```typescript import { useInstallation } from '@react-bits/hooks'; export default function InstallationGuide() { const { variant, command, setVariant, handleCopy, copied } = useInstallation('AnimatedContent'); return (
{command}
); } ``` -------------------------------- ### Installing AnimatedContent via jsrepo Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/api-reference.md Shows how to install the AnimatedContent-TS-CSS component using jsrepo or shadcn. ```bash npx jsrepo add @react-bits/AnimatedContent-TS-CSS # or via shadcn npx shadcn@latest add @react-bits/AnimatedContent-TS-CSS ``` -------------------------------- ### Install Component via shadcn CLI Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/configuration.md Command to install a specific component variant using the shadcn CLI. ```bash # Via shadcn npx shadcn@latest add @react-bits/AnimatedContent-TS-CSS ``` -------------------------------- ### Setting up ComponentPropsProvider Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/hooks.md Shows the basic setup for `ComponentPropsProvider`, which is required to use hooks like `useComponentPropsContext`. ```typescript import { ComponentPropsProvider } from '@react-bits/hooks'; ``` -------------------------------- ### useInstallation Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/hooks.md Hook for managing installation commands for components, supporting various build configurations. ```APIDOC ## useInstallation ### Description Manages installation commands for components, allowing selection of different build variants (e.g., JavaScript/TypeScript, CSS/Tailwind). ### Parameters #### Path Parameters - **componentName** (string) - Required - Component name (e.g., 'AnimatedContent') ### Return Values - **variant** (string) - Currently selected variant - **copied** (boolean) - Whether install command was copied - **command** (string) - Current installation command - **setVariant** - (v) => void - Set selected variant - **handleCopy** - () => void - Copy command to clipboard ### Supported Variants - `JS-CSS` - JavaScript with CSS modules - `JS-TW` - JavaScript with Tailwind CSS - `TS-CSS` - TypeScript with CSS modules - `TS-TW` - TypeScript with Tailwind CSS ### Usage Example ```typescript import { useInstallation } from '@react-bits/hooks'; export default function InstallationGuide() { const { variant, command, setVariant, handleCopy, copied } = useInstallation('AnimatedContent'); return (
{command}
); } ``` ### Generated Command Format ``` npx jsrepo add @react-bits/{ComponentName}-{Variant} npx shadcn@latest add @react-bits/{ComponentName}-{Variant} ``` ``` -------------------------------- ### useInstallation Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/hooks.md Manages the installation state and related methods for a component, primarily used within documentation demo pages. ```APIDOC ## useInstallation ### Description Hook designed to manage the installation state and associated methods for a specific component. Its primary use case is within the documentation's demo pages to illustrate installation procedures. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **componentName** (string) - The name of the component for which to manage installation state. ### Return Values - **variant** (string) - The currently selected installation variant. - **copied** (boolean) - A flag indicating whether the installation command has been copied. - **command** (string) - The installation command string. - **setVariant** ( (v: string) => void ) - A function to set the installation variant. - **handleCopy** ( () => void ) - A function to handle copying the installation command to the clipboard. ``` -------------------------------- ### Learning Path for React Developers Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/INDEX.md A learning path tailored for React developers new to react-bits, guiding them through the project overview, API examples, and type definitions. ```markdown ### For React Developers (New to react-bits) 1. [README.md](README.md) - Project overview (10 min) 2. [api-reference.md](api-reference.md) - Browse examples (20 min) 3. [types.md](types.md) - Understand prop types (10 min) 4. Start building! (30 min+) ``` -------------------------------- ### Install Component via jsrepo CLI Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/configuration.md Command to install a specific component variant using the jsrepo CLI. ```bash # Via jsrepo npx jsrepo add @react-bits/AnimatedContent-TS-CSS ``` -------------------------------- ### Install Component with shadcn Source: https://github.com/davidhdev/react-bits/blob/main/README.md Use the shadcn CLI to add a specific React Bits component to your project. Ensure you have shadcn installed. ```bash npx shadcn@latest add @react-bits/BlurText-TS-TW ``` -------------------------------- ### Registry Component JSON Output Example Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/configuration.md Example of the JSON structure for a component entry in the registry. It includes metadata like name, title, description, type, categories, and file paths. ```json { "name": "AnimatedContent-TS-CSS", "title": "AnimatedContent", "description": "Wrapper that animates children on scroll...", "type": "registry:component", "categories": ["Animations"], "files": [ { "path": "src/ts-default/Animations/AnimatedContent/AnimatedContent.tsx" }, { "path": "src/ts-default/Animations/AnimatedContent/AnimatedContent.css" } ] } ``` -------------------------------- ### Component File Structure Example Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/configuration.md Shows the typical directory layout for a component, including the main component file, CSS, and optional files. ```plaintext src/ts-default/Animations/AnimatedContent/ ├── AnimatedContent.tsx (Main component) ├── AnimatedContent.css (Styles) └── (optional files) ``` -------------------------------- ### Completeness Checklist Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/INDEX.md A checklist indicating the completeness of the react-bits documentation, covering aspects like component APIs, type definitions, hooks, utilities, configuration, installation, and examples. ```markdown This documentation covers: - ✅ **Component APIs** - All exported components with full signatures - ✅ **Type Definitions** - All TypeScript interfaces and types - ✅ **Hook Documentation** - All custom React hooks with examples - ✅ **Utility Functions** - All helper functions with use cases - ✅ **Configuration** - Registry and build system setup - ✅ **Installation** - Multiple installation methods - ✅ **Code Examples** - Practical usage examples for each API - ✅ **Type Tables** - Parameters and return values documented - ✅ **Performance Notes** - Best practices and optimization tips - ✅ **Troubleshooting** - Common issues and solutions - ✅ **Navigation** - Cross-linking between documents - ✅ **Contributing Guide** - How to add new components ``` -------------------------------- ### GSAP Animation Configuration Example Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/types.md Illustrates the usage of GSAP for animations, including defining a type for easing strings and an example of animating properties like rotation and opacity with specified duration and ease. ```typescript import gsap from 'gsap'; // Easing strings type EaseString = 'power1.out' | 'power2.out' | 'power3.out' | 'power4.out' | 'power1.in' | 'power2.in' | 'power3.in' | 'power4.in' | 'back.out' | 'elastic.out' | 'bounce.out' | /* ... */; gsap.to(element, { duration: 0.5, ease: 'power3.out', rotateX: 45, opacity: 1 }); ``` -------------------------------- ### Install TypeScript with CSS Modules Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/README.md Use this command to add the TypeScript with CSS Modules variant of a component to your project. ```bash npx jsrepo add @react-bits/AnimatedContent-TS-CSS ``` -------------------------------- ### Memoizing Calculated Values with useMemo Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/utilities.md Optimize performance by memoizing expensive calculations using `useMemo`. This example demonstrates memoizing window size calculations and updating them on resize. ```typescript const windowSize = useMemo(() => calcWinsize(), []); useEffect(() => { const handleResize = () => { Object.assign(windowSize, calcWinsize()); }; window.addEventListener('resize', handleResize); return () => window.removeEventListener('resize', handleResize); }, []); ``` -------------------------------- ### Custom Hooks Reference Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/INDEX.md Reference for custom React hooks, including their signatures, parameters, return values, and usage examples. Covers hooks for prop management, installation helpers, route detection, state management, and more. ```APIDOC ## Custom Hooks Reference This section details the custom React hooks available in the library. 1. **useComponentProps()** - Description: URL-based prop state management, query parameter synchronization, and sharing URLs with configurations. Supports type parsing for numbers, booleans, colors, and strings. - Signature: [Full function signature] - Parameters: [Parameter table] - Return Value: [Return value documentation] - Usage Examples: [Complete usage examples] 2. **useInstallation()** - Description: Provides component installation helpers, variant selection management, copy-to-clipboard functionality, and installation command generation. - Signature: [Full function signature] - Parameters: [Parameter table] - Return Value: [Return value documentation] - Usage Examples: [Complete usage examples] 3. **useActiveRoute()** - Description: Hook for route detection and active state management for navigation. - Signature: [Full function signature] - Parameters: [Parameter table] - Return Value: [Return value documentation] - Usage Examples: [Complete usage examples] 4. **useForceRerender()** - Description: Utility hook to force component re-renders, useful for debugging and testing. - Signature: [Full function signature] - Parameters: [Parameter table] - Return Value: [Return value documentation] - Usage Examples: [Complete usage examples] 5. **useScrollToTop()** - Description: Automatically scrolls to the top on component mount and handles scroll-to-top on route changes. - Signature: [Full function signature] - Parameters: [Parameter table] - Return Value: [Return value documentation] - Usage Examples: [Complete usage examples] 6. **useTransition()** - Description: Manages transition states and handles asynchronous operations. - Signature: [Full function signature] - Parameters: [Parameter table] - Return Value: [Return value documentation] - Usage Examples: [Complete usage examples] 7. **useStars()** - Description: Fetches GitHub star counts with caching using localStorage. - Signature: [Full function signature] - Parameters: [Parameter table] - Return Value: [Return value documentation] - Usage Examples: [Complete usage examples] 8. **useComponentPropsContext()** - Description: Enables context-based prop management for multi-component coordination. - Signature: [Full function signature] - Parameters: [Parameter table] - Return Value: [Return value documentation] - Usage Examples: [Complete usage examples] --- ``` -------------------------------- ### Development Server Concurrency Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/configuration.md Starts the development environment, running the registry builder and Vite dev server in parallel. Output colors distinguish between registry (blue) and docs (green). ```bash npm run dev ``` -------------------------------- ### useActiveRoute Usage Example Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/hooks.md Shows how to use the useActiveRoute hook to highlight the active navigation link based on the current URL. ```typescript import { useActiveRoute } from '@react-bits/hooks'; export default function Navigation() { const activeRoute = useActiveRoute([ '/animations/blob-cursor', '/animations/magic-rings', '/text-animations/blur-text' ]); return ( ); } ``` -------------------------------- ### Animation Optimization Examples Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/README.md Illustrates good and cautioned practices for animation performance. Prioritizes GPU acceleration and efficient rendering techniques. ```typescript // ✅ Good: 60fps animations with requestAnimationFrame // ✅ Good: GPU-accelerated CSS transforms // ⚠️ Caution: Heavy JavaScript animations // Prefer GSAP or motion.js libraries ``` -------------------------------- ### Plasma Background Component Example Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/api-reference.md Integrate an animated plasma effect for a dynamic background. Customize the appearance using an array of colors, speed, and turbulence settings. ```typescript import Plasma from '@react-bits/Plasma-TS-CSS'; export default function App() { return ( ); } ``` -------------------------------- ### Utility Functions Documentation Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/DOCUMENTATION_SUMMARY.txt The utilities.md file documents 10 utility functions, including animation and general utilities, with details on signatures, parameters, return values, and examples. ```APIDOC ## Utility Functions ### Description Documents the utility functions provided by the react-bits library. ### Details - **File**: utilities.md - **Content**: 10 utility functions documented. - **Categories**: Animation utilities (map, lerp, getMousePos, calcWinsize, getRandomNumber) and General utilities (getLanguage, getStarsCount, decodeLabel, etc.). - **Per Utility**: Includes signature, parameters, return value, examples, and formulas. - **Additional Info**: Covers common patterns, recipes, third-party utilities reference, and performance tips. ``` -------------------------------- ### API Reference Overview Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/DOCUMENTATION_SUMMARY.txt The api-reference.md file contains complete API documentation for over 21 components, organized by category. It includes component signatures, parameters, return types, usage examples, and export/import information. ```APIDOC ## API Reference ### Description Provides comprehensive API documentation for all components within the react-bits library. ### Details - **File**: api-reference.md - **Content**: Complete API documentation for 21+ components. - **Organization**: Organized by category (Animations, TextAnimations, Components, Backgrounds). - **Per Component**: Includes signature, parameters, return type, usage example, and source reference. - **Additional Info**: Covers export structure, import paths, common props patterns, variant system, dependencies, accessibility, and performance notes. ``` -------------------------------- ### Install TypeScript with Tailwind CSS Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/README.md Use this command to add the TypeScript with Tailwind CSS variant of a component to your project. ```bash npx jsrepo add @react-bits/AnimatedContent-TS-TW ``` -------------------------------- ### useInstallation Hook Signature Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/hooks.md Defines the signature for the useInstallation hook, which manages installation state and methods for components, primarily used in documentation demos. ```typescript function useInstallation(componentName: string): { variant: string; copied: boolean; command: string; setVariant: (v: string) => void; handleCopy: () => void; } ``` -------------------------------- ### Galaxy Background Component Example Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/api-reference.md Create a 3D particle galaxy simulation for your background. Configure the number of particles, animation speed, and color scheme. This component relies on the Three.js library. ```typescript import Galaxy from '@react-bits/Galaxy-TS-CSS'; export default function App() { return ( ); } ``` -------------------------------- ### useComponentProps Usage Example Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/hooks.md Demonstrates how to use the useComponentProps hook to manage and update component props, including syncing with URL parameters and providing shareable links. ```typescript import { useComponentProps } from '@react-bits/hooks'; export default function Demo() { const { props, updateProp, resetProps, getShareUrl } = useComponentProps({ distance: 100, duration: 0.8, backgroundColor: '#ffffff', enabled: true }); return (

Animated content

updateProp('distance', Number(e.target.value))} />
); } ``` -------------------------------- ### useStars Hook Example Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/hooks.md Shows how to fetch and display the star count for a GitHub repository using the useStars hook. It handles loading states and potential fetch failures. ```typescript import { useStars } from '@react-bits/hooks'; export default function Header() { const stars = useStars('davidhdev', 'react-bits'); return (

React Bits

{stars !== null && ⭐ {stars.toLocaleString()} stars}
); } ``` -------------------------------- ### useForceRerender Usage Example Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/hooks.md Demonstrates using the useForceRerender hook to force a component to re-render, useful for debugging or testing specific scenarios. ```typescript import { useForceRerender } from '@react-bits/hooks'; export default function TestComponent() { const forceRerender = useForceRerender(); return (
{/* ... */}
); } ``` -------------------------------- ### useScrollToTop Hook Example Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/hooks.md Illustrates the basic usage of the useScrollToTop hook, which automatically scrolls the page to the top on component mount or route changes. ```typescript import { useScrollToTop } from '@react-bits/hooks'; export default function Page() { // Automatically scroll to top on mount/route change useScrollToTop(); return (
{/* Page content */}
); } ``` -------------------------------- ### Custom Hooks Documentation Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/DOCUMENTATION_SUMMARY.txt The hooks.md file documents 8 custom React hooks, providing full signatures, parameter tables, return value documentation, and complete usage examples. ```APIDOC ## Custom Hooks ### Description Documents the custom React hooks available in the react-bits library. ### Details - **File**: hooks.md - **Content**: 8 custom React hooks documented. - **Per Hook**: Includes full signatures, parameter tables, return value documentation, and complete usage examples. - **Additional Info**: Covers internal behavior, performance notes, hook patterns, combinations, browser compatibility, and performance tips. ``` -------------------------------- ### useTransition Hook Example Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/hooks.md Demonstrates how to use the useTransition hook to manage UI states during asynchronous operations or navigation. It provides a boolean flag for transition state and a function to initiate transitions. ```typescript import { useTransition } from '@react-bits/hooks'; export default function NavigationLink() { const { isTransitioning, startTransition } = useTransition(); const handleClick = () => { startTransition(() => { // Navigate or perform async operation router.push('/next-page'); }); }; return ( ); } ``` -------------------------------- ### Magnet Component Usage Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/README.md Example of using the Magnet component with spring physics for interactive elements. It provides a magnetic effect to child elements. ```typescript ``` -------------------------------- ### Hero Section with Animations Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/README.md Example of a hero section using Aurora background and AnimatedContent for scroll-triggered animations. Ensure Aurora and AnimatedContent components are imported. ```typescript

Welcome

Scroll to explore

``` -------------------------------- ### Carousel Component Example Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/api-reference.md Implement a gallery carousel with touch controls and pagination. Provide an array of React nodes for the slides and configure autoplay and interval settings as needed. ```typescript import Carousel from '@react-bits/Carousel-TS-CSS'; export default function App() { return ( , , ] } autoPlay={true} interval={5000} /> ); } ``` -------------------------------- ### Documentation Statistics Table Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/INDEX.md Displays key metrics about the project's documentation, including lines, files, components, hooks, utilities, types, code examples, and tables. ```markdown | Metric | Value | |--------|-------| | Total Documentation Lines | 4,029 | | Total Documentation Files | 6 | | Components Documented | 21+ | | Hooks Documented | 8 | | Utilities Documented | 10 | | Types Documented | 10+ | | Code Examples | 50+ | | Tables | 30+ | ``` -------------------------------- ### DotGrid Background Component Example Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/api-reference.md Use the DotGrid component for an animated grid of dots background. Adjust density, colors, and speed to control the visual appearance. Enable interactivity to respond to mouse position. ```typescript import DotGrid from '@react-bits/DotGrid-TS-CSS'; export default function App() { return ( ); } ``` -------------------------------- ### Components API Reference Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/INDEX.md Detailed API documentation for all components, including animations, text animations, general components, and backgrounds. Each component's documentation includes its TypeScript function signature, parameter table, return type, usage examples, and error conditions. ```APIDOC ## Components API Reference This section details the API for various components within the React Bits library. ### Animations - **AnimatedContent** - Description: Scroll-triggered animation wrapper. - Signature: [Full TypeScript function signature] - Parameters: [Complete parameter table] - Return Type: [Return type documentation] - Usage Examples: [Usage code examples] - Error Conditions: [Throwing/error conditions] - **BlobCursor** - Description: Organic cursor trail with inertia. - Signature: [Full TypeScript function signature] - Parameters: [Complete parameter table] - Return Type: [Return type documentation] - Usage Examples: [Usage code examples] - Error Conditions: [Throwing/error conditions] - **FadeContent** - Description: Simple fade/slide entrance/exit. - Signature: [Full TypeScript function signature] - Parameters: [Complete parameter table] - Return Type: [Return type documentation] - Usage Examples: [Usage code examples] - Error Conditions: [Throwing/error conditions] - **GhostCursor** - Description: Semi-transparent cursor following. - Signature: [Full TypeScript function signature] - Parameters: [Complete parameter table] - Return Type: [Return type documentation] - Usage Examples: [Usage code examples] - Error Conditions: [Throwing/error conditions] - **Magnet** - Description: Cursor attraction with spring physics. - Signature: [Full TypeScript function signature] - Parameters: [Complete parameter table] - Return Type: [Return type documentation] - Usage Examples: [Usage code examples] - Error Conditions: [Throwing/error conditions] - **Cubes** - Description: 3D rotating cube grid. - Signature: [Full TypeScript function signature] - Parameters: [Complete parameter table] - Return Type: [Return type documentation] - Usage Examples: [Usage code examples] - Error Conditions: [Throwing/error conditions] ### Text Animations - **BlurText** - Description: Blur-to-sharp text reveal. - Signature: [Full TypeScript function signature] - Parameters: [Complete parameter table] - Return Type: [Return type documentation] - Usage Examples: [Usage code examples] - Error Conditions: [Throwing/error conditions] - **CountUp** - Description: Animated number counter. - Signature: [Full TypeScript function signature] - Parameters: [Complete parameter table] - Return Type: [Return type documentation] - Usage Examples: [Usage code examples] - Error Conditions: [Throwing/error conditions] - **GlitchText** - Description: Glitch distortion effect. - Signature: [Full TypeScript function signature] - Parameters: [Complete parameter table] - Return Type: [Return type documentation] - Usage Examples: [Usage code examples] - Error Conditions: [Throwing/error conditions] - **CircularText** - Description: Circular text layout. - Signature: [Full TypeScript function signature] - Parameters: [Complete parameter table] - Return Type: [Return type documentation] - Usage Examples: [Usage code examples] - Error Conditions: [Throwing/error conditions] ### Components - **Counter** - Description: High-performance digit display. - Signature: [Full TypeScript function signature] - Parameters: [Complete parameter table] - Return Type: [Return type documentation] - Usage Examples: [Usage code examples] - Error Conditions: [Throwing/error conditions] - **BorderGlow** - Description: Glowing card with edge tracking. - Signature: [Full TypeScript function signature] - Parameters: [Complete parameter table] - Return Type: [Return type documentation] - Usage Examples: [Usage code examples] - Error Conditions: [Throwing/error conditions] - **Dock** - Description: Mac-style application dock. - Signature: [Full TypeScript function signature] - Parameters: [Complete parameter table] - Return Type: [Return type documentation] - Usage Examples: [Usage code examples] - Error Conditions: [Throwing/error conditions] - **Carousel** - Description: Gallery carousel with pagination. - Signature: [Full TypeScript function signature] - Parameters: [Complete parameter table] - Return Type: [Return type documentation] - Usage Examples: [Usage code examples] - Error Conditions: [Throwing/error conditions] ### Backgrounds - **Aurora** - Description: Aurora borealis WebGL effect. - Signature: [Full TypeScript function signature] - Parameters: [Complete parameter table] - Return Type: [Return type documentation] - Usage Examples: [Usage code examples] - Error Conditions: [Throwing/error conditions] - **Plasma** - Description: Turbulent plasma animation. - Signature: [Full TypeScript function signature] - Parameters: [Complete parameter table] - Return Type: [Return type documentation] - Usage Examples: [Usage code examples] - Error Conditions: [Throwing/error conditions] - **DotGrid** - Description: Animated grid of dots. - Signature: [Full TypeScript function signature] - Parameters: [Complete parameter table] - Return Type: [Return type documentation] - Usage Examples: [Usage code examples] - Error Conditions: [Throwing/error conditions] --- ``` -------------------------------- ### Aurora Background Component Example Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/api-reference.md Add an animated aurora effect to your background using WebGL. Configure the color stops, amplitude, blend, and speed to customize the light wave animation. ```typescript import Aurora from '@react-bits/Aurora-TS-CSS'; export default function App() { return ( ); } ``` -------------------------------- ### PillNav Component Example Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/api-reference.md Use PillNav for creating a navigation bar with an animated active indicator. It requires an array of item labels, the currently active item index, and a callback for selection. ```typescript import PillNav from '@react-bits/PillNav-TS-CSS'; export default function App() { const [active, setActive] = useState(0); return ( ); } ``` -------------------------------- ### Build Registry Script Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/configuration.md After adding a new component and updating its information, run this script to build the project registry. ```bash npm run registry:build ``` -------------------------------- ### Animated Number Counter Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/api-reference.md Animate number counts with CountUp. Supports formatting and decimals. Configure target and starting numbers, duration, and direction. Starts automatically on mount or when in view. ```typescript import CountUp from '@react-bits/CountUp-TS-CSS'; export default function App() { return ( ); } ``` -------------------------------- ### Distribution Method: shadcn/ui Compatible Source: https://github.com/davidhdev/react-bits/blob/main/_autodocs/configuration.md Command to add a component to your project, compatible with shadcn/ui. ```bash npx shadcn@latest add @react-bits/ComponentName-TS-CSS ``` -------------------------------- ### Add Component with shadcn CLI Source: https://github.com/davidhdev/react-bits/blob/main/public/llms.txt Use the shadcn CLI to add components. Specify the component name, language (JS/TS), and style (CSS/TW). ```bash npx shadcn@latest add https://reactbits.dev/r/--