altalt

How to clone example template from Next JS repository?

posted by  Akash Sarki  on  20 May 2025

Suppose you want to clone one of the example template from the official repository of Next JS Github. How would you do that?

This is how you do it:

npx create-next-app@latest --example <example-name> <project-folder-name>

  • npx - Runs a tool temporarily without installing it.
  • create-next-app@latest - This is the tool to create a new Next.js app. @latest just means "use the latest version."
  • --example - You're saying, "I want to use a ready-made template (example)."
  • <example-name> - Replace this with the name of the example (like with-tailwindcss, with-redux, etc.).
  • <project-folder-name> - This is what your app folder will be called. You can name it anything.


    For example - If you want to install "gsap" example template of next JS, then you would write:
npx create-next-app@latest --example with-gsap my-app

The above example template from here.


You can also use a GitHub URL:

npx create-next-app@latest --example "https://github.com/vercel/next.js/tree/canary/examples/with-gsap" my-gsap-app


footer company logo

Stay informed with Web Journal - Delivering fresh, reliable news and insights on the topics that matter most, all in one place.

Contact Address :

Checkpost, Siliguri
West Bengal - 734003
9883475729
akashsarki12345@gmail.com

Copyright © 2025 Web Journal. All Rights Reserved