Introducing ReUI:Open-source UI components and apps built with React, Next.js and Tailwind CSS
Browse ReUI

How can I integrate demo10 of the Tailwind version of Metronic with the NextJS framework?


Hello, thank you for creating such an amazing framework.

I am running and testing it with NextJS. Currently, I am using the import statement:


import KTLayout from "@/metronic/app/layouts/demo1";



However, I would like to use demo10 instead. Is there a solution for this? Could you provide guidance on how to modify it? Thank you, as always.

Do you have any plans to integrate demo10 with NextJS?


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (2)


Integrating Demo10 of the Tailwind version of Metronic with Next.js involves setting up a Next.js project and configuring Tailwind CSS properly. First, install Next.js with npx create-next-app@latest my-metronic-app and navigate into the project directory. Then, install Tailwind CSS using npm install -D tailwindcss postcss autoprefixer and generate the configuration files with npx tailwindcss init -p. Next, copy the Demo10 components and assets from Metronic into the components and styles folders of your Next.js app. Ensure that Tailwind’s content configuration in tailwind.config.js includes all relevant files, such as ./pages/**/*.{js,ts,jsx,tsx} and ./components/**/*.{js,ts,jsx,tsx}. If Metronic uses specific plugins, install them as needed. Finally, start your Next.js app with npm run dev and verify the integration. Whether it's setting up a dashboard, authentication pages, or Fake Phone Pay APK payment integrations, ensure that all UI elements align with Tailwind’s utility classes for a seamless design.



Hi,

Thank you for reaching out to us.

For the demo10 you do not need to initialize any layout file, make sure to initialize global component file KTComponent.init();.

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(