magicuidesign / magicui

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
https://magicui.design
MIT License
10.56k stars 412 forks source link

Issue: Migrate Components to CRA/Vite from Next.js #93

Open AbdallahAltokhy opened 4 months ago

AbdallahAltokhy commented 4 months ago

To make the library more versatile and easier to integrate with various projects, I propose migrating the components to work with Create React App (CRA) and Vite. This will allow developers who do not use Next.js to benefit from the components and will enhance the overall usability and adoption of our library.

Objectives:

  1. Decouple components from Next.js: Ensure all components are independent of Next.js-specific features.
  2. Create a build process for CRA and Vite: Set up the necessary configuration and scripts for both CRA and Vite.
  3. Maintain backward compatibility: Ensure the components remain usable with Next.js after migration.
  4. Update documentation: Provide clear instructions on how to use the components with CRA and Vite.

Expected Outcome: The migration should result in fully functional components that run seamlessly in CRA/Vite, and Next.js with the same functionalities and appearance

dillionverma commented 4 months ago

Great idea I fully support this 👍

However, I do think most the components should work by default with CRA and vite. Only the installation steps might be a bit different.

Do you know any components which won't work with CRA and vite?

If not, then all we need to do to solve this issue is write amazing documentation.

Here's a good reference for ideas https://ui.shadcn.com/docs/installation/vite