I recently purchased Metronic 9 Tailwind CSS version and integrated it with my React application. Following the documentation, I added the initialization code to my app.js:
useEffect(() => {
KTComponent.init();
KTLayout.init();
}, []);
Integrating Metronic 9 with Tailwind CSS and React requires careful handling of styling conflicts and component structures. Since Metronic primarily uses Bootstrap and SCSS, you may face clashes with Tailwind’s utility-first approach. To ensure smooth integration, you can gradually replace Metronic’s default styles with Tailwind classes while keeping necessary components intact. Avoid using conflicting global styles and prefer scoped styling where possible. https://3rrgamedownload.com . If Metronic’s prebuilt UI components are essential, customize them using Tailwind’s utility classes instead of relying on Bootstrap. This approach helps maintain a clean, scalable, and efficient design system within your React project.
Hi Sean,
I think we both are referring to the same link. I'm also following the React integration guide at <a>https://keenthemes.com/metronic/tailwind/docs/getting-started/integration/react</a>
and downloaded the associated GitHub repository. However, I have some concerns about component flexibility.
The repository provides Header, Footer, and Sidebar components, but they seem to be tightly coupled with Metronic's core utilities. For example, in the Header component, menu items' hover/click events are handled by Metronic's utils rather than through React's event handling system.
In a typical React application, developers have the flexibility to:
Handle their own events
Add custom callbacks
Modify component behavior
My questions:
Are we limited to using only Metronic's pre-built components and their default functionality?
Is there a way to extend these components with custom React behavior while maintaining Metronic's styling and features?
Can we handle events (like menu clicks) in our React code instead of relying on Metronic's utils?
I want to understand if I'm missing something in the implementation or if this is the intended architecture of Metronic's React integration.
Hi,
You are trying to implement HTML/JS features(this guide was actual till we release the react version) in React. But now we have generic React version already implement all those featires in React way.
Please download the latest Metronic v9 and refer to the react vite version of Metronic 9.
Regards,
Sean
Hi,
We would suggest you to use the generic React version of Metronic 9 Tailwind React.
The integration guide(HTML/JS to React) you are referring to was provided before the official react vite version of Metronic 9 Tailwind. Now the official react version is available and you can download it from themeforest.net/downloads and refer to Metronic 9 Tailwind React Vite version.
Regards,
Sean