Skip to content
Documentation Templates Tailwind CSS 4 nextjsreacttypescriptnextra

React Next.js 16 Starter with Tailwind CSS 4 - Nextjs Nextra Starter

A starter template for Next.js 16 with Tailwind CSS 4, Nextra 4, Shadcn UI and Radix UI. Includes docs, blog, AI SaaS landing page, dark mode and i18n.

By pdsuwwz pdsuwwz/nextjs-nextra-starter 319 stars

Introduction

Nextjs Nextra Starter is a starter template for building documentation‑driven sites with Next.js 16, React 19, TypeScript, and Tailwind CSS 4. It includes ready‑made pages for docs, a blog, and an AI SaaS landing page, and supports dark mode, i18n, and UI libraries such as Shadcn UI and Radix UI.

What this project offers

  • A complete Next.js application configured for content‑driven sites.
  • Integrated Tailwind CSS 4 with Sass support.
  • Documentation and blog sections powered by Nextra 4.
  • Dark‑mode toggle and multilingual routing (English and Chinese).
  • UI component libraries (Shadcn UI, Radix UI) and animation utilities.
  • Search powered by Pagefind and automatic sitemap generation.

Main features

  • Docs site and blog starter.
  • AI SaaS landing page.
  • Dark mode with theme switching.
  • i18n support for English and Chinese.
  • Shadcn UI and Radix UI components.
  • Sass integration and Tailwind CSS 4 utilities.
  • Pagefind static search index.
  • Post‑build sitemap generation.

Technology stack

  • Framework: Next.js 16
  • UI: React 19, Tailwind CSS 4, Sass
  • Documentation: Nextra 4 (nextra‑theme‑docs)
  • Component libraries: Shadcn UI, Radix UI, Aceternity UI
  • Language: TypeScript
  • Styling helpers: tailwind‑merge, tailwindcss‑animate
  • Search: Pagefind
  • Other tools: ESLint 9, PostCSS, Iconify, next‑themes, tsparticles

Requirements

  • Node >= 20.x
  • pnpm >= 9.x

Installation

  1. Download the starter archive
/download/nextjs-nextra-starter.zip
  1. Extract the archive to a folder of your choice.
  2. Open a terminal in the extracted folder.
  3. Install dependencies
pnpm i
  1. Run the development server (optional, to verify the setup)
pnpm dev

Open http://localhost:8000 in a browser. The site should load.

  1. Build the production version
pnpm build

This runs next build. After the build finishes, two post‑build steps are executed automatically:

  • next-sitemap creates a sitemap file.
  • pagefind generates a static search index in public/_pagefind.
  1. Start the production server (if you want to serve it locally)
pnpm start

The server listens on port 7000 (http://localhost:7000).

Configuration

Configuration files are located at the project root:

  • next.config.ts – Next.js configuration, including i18n locales, image handling, and Sass options.
  • next-sitemap.config.mjs – Sitemap generation settings.
  • postcss.config.mjs – PostCSS setup for Tailwind.
  • tsconfig.json – TypeScript compiler options.

Environment variables such as SITE_URL can be set to customize the sitemap URL.

Customizing the project

  • Tailwind theme: Edit tailwind.config.js (generated by Tailwind 4) to add colors, spacing, or plugins.
  • Sass styles: Add or modify .scss files under src/assets/ and import them where needed.
  • Content: Place markdown or MDX files in src/content/en and src/content/zh to edit docs or blog posts.
  • UI components: New Shadcn UI components can be added with pnpm dlx shadcn@latest add <component>. Existing components live in src/components/ui/.
  • Search: The static search index is regenerated automatically after each pnpm build. Adjust Pagefind options in the postbuild script if needed.

Project structure

LICENSE
README.md
package.json
pnpm-lock.yaml
next-env.d.ts
next-sitemap.config.mjs
next.config.ts
postcss.config.mjs
tsconfig.json
public/
  img/
    favicon.svg
    next.svg
    vercel.svg
src/
  app/
    [lang]/
    _dictionaries/
  assets/
    images/
  components/
    AIDemoLanding/
    CustomFooter/
    HomepageHero/
    MotionWrapper/
    PanelParticles/
    ScrollProgressBar/
    ThemeSwitcher/
    TitleBadge/
    auth/
    ui/
  content/
    en/
    zh/
  hooks/
    index.ts
    useBreakpoint.ts
    useLocale.ts
    useServerLocale.ts
  i18n/
    ai-demo.ts
    en.ts
    index.ts
    zh.ts
  lib/
    utils.ts
  mdx-components.ts
  proxy.ts
  widgets/
    auth-button.tsx
    locale-toggle.tsx
    mobile-menu-auth.tsx
    navbar-extras.tsx
    theme-toggle.tsx

Tips

  • Use pnpm dev during development; it runs Next.js with Turbopack on port 8000 for fast hot‑reloading.
  • After editing content, the development server updates automatically; for production, always run pnpm build to regenerate the search index.
  • The project is ready for deployment on Vercel or Netlify; simply point the platform to the repository and it will run pnpm install && pnpm build && pnpm start.
  • To add additional locales, update the i18n.locales array in next.config.ts and create matching folders under src/content/.

License and attribution

The project is licensed under the MIT License. See the full license file at the repository:

https://github.com/pdsuwwz/nextjs-nextra-starter

When redistributing or using this starter, keep the LICENSE file intact and credit the original author as required by the MIT terms.