Motion-Primitives

repository·main·Indexed 26 days ago

https://github.com/ibelick/motion-primitives

A library of animated React components for engineers and designers, built using motion.dev and Tailwind CSS. It includes a CLI for adding components like Accordion, Animated Background, Animated Group, Animated Number, Border Trail, and Carousel to projects, automatically managing dependencies.

Tokens
14.2K
Snippets
9
Records
135
Agent score
90%

What's inside motion-primitives

  1. Install Motion-Primitives dependencies

    main

    To use Motion-Primitives, you must ensure your project has Tailwind CSS, Motion, and Lucide React installed. Follow these steps:

    1. Install Tailwind CSS: Components are styled with Tailwind. Follow the official Tailwind installation guide.
    2. Install Motion: Components use motion for animations.
    3. Install Lucide React: Components use lucide-react for icons.
    npm install motion
    npm install lucide-react
  2. Install the ProgressiveBlur component

    main

    You can install the ProgressiveBlur component using the CLI or by manual installation.

    CLI Installation: Run the following command to add the component to your project:

    Manual Installation:

    1. Copy the source code from components/core/progressive-blur.tsx into your project.
    2. Update the import paths within the file to match your project's directory structure.
  3. Install the Cursor component

    main

    You can install the Cursor component using the CLI or by manual installation.

    CLI Installation: Run the installation command for the cursor component.

    Manual Installation:

    1. Copy the source code from components/core/cursor.tsx into your project.
    2. Update the import paths within the file to match your project's directory structure.
  4. Install the Infinite Slider component

    main

    You can install the InfiniteSlider component using the CLI or by manual installation.

    Via CLI

    Run the following command to add the component to your project:

    # Use the CLI to add the infinite-slider component
    # (Note: exact command depends on your CLI setup, typically follows the pattern below)
    # npx motion-primitives add infinite-slider

    Manual Installation

    1. Copy the source code from components/core/infinite-slider.tsx into your project.
    2. Update the import paths within the file to match your project's directory structure.
  5. Install the Glow Effect component

    main

    You can install the Glow Effect component using the CLI or by manual installation.

    CLI Installation: Run the following command to add the component to your project: npx motion-primitives add glow-effect

    Manual Installation:

    1. Copy the source code from components/core/glow-effect.tsx into your project.
    2. Update the import paths within the file to match your project's directory structure.
  6. Install the Text Loop component

    main

    You can install the text-loop component using the CLI or by manual installation.

    CLI Installation: Run the following command to add the component to your project:

    Manual Installation:

    1. Copy the source code from components/core/text-loop.tsx into your project.
    2. Update the import paths within the file to match your project's directory structure.