Templates
Jumpstart your project with production-ready Material UI templates. All templates are built with real Material UI source code and follow best practices.Available Templates
Material UI provides example projects demonstrating integration with popular React frameworks and build tools.Framework Templates
Next.js (App Router)
Material UI with Next.js 13+ App Router and TypeScript. Includes Emotion integration and server-side rendering.
Next.js (Pages Router)
Material UI with Next.js Pages Router for projects using the traditional routing approach.
Vite
Fast development with Vite and Material UI. Includes HMR and optimized builds.
Remix
Material UI integrated with Remix for full-stack React applications.
Build Tool Examples
Create React App
Classic Create React App setup with Material UI and TypeScript.
Gatsby
Static site generation with Gatsby and Material UI components.
Preact
Lightweight alternative using Preact with Material UI.
CDN (No Build)
Quick prototyping with CDN links - no build step required.
Next.js Template (Recommended)
The Next.js App Router template demonstrates modern Material UI integration with server components.Installation
Key Features
- App Router: Next.js 13+ App Router with React Server Components
- TypeScript: Full type safety with Material UI type definitions
- Emotion Cache: Optimized CSS-in-JS with SSR support
- Theme Integration: Custom theme with light/dark mode
- Font Optimization: Roboto font with Next.js font optimization
Project Structure
Example Code from Template
The template includes a working example with Material UI components:src/app/page.tsx
Vite Template
Fast, modern development with Vite’s instant HMR and optimized production builds.Installation
Key Features
- Lightning Fast HMR: Instant updates during development
- Optimized Builds: Tree-shaking and code splitting out of the box
- TypeScript: Full type support with Material UI
- Minimal Config: Clean, minimal Vite configuration
Example Code from Template
Simple, clean component structure:src/App.tsx
src/ProTip.tsx
Advanced Templates
Pigment CSS (Zero-Runtime)
Experimental templates using zero-runtime CSS extraction:Next.js + Pigment CSS
Static CSS extraction with Next.js for optimal performance
Vite + Pigment CSS
Zero-runtime styling with Vite’s build optimization
Styling Alternatives
Tailwind CSS
Combine Material UI components with Tailwind utility classes
React Router
Client-side routing with React Router and Material UI
Server-Side Rendering
Express + SSR
Full server-side rendering with Express:- Custom Express server
- Server-side rendering with Emotion
- Critical CSS extraction
- Production-ready build
Template Package.json
All templates include these core dependencies from the Material UI source:package.json
Customizing Templates
Theme Customization
All templates include a theme file you can customize:theme.ts
Adding Components
All Material UI components are available in templates:Production Deployment
All templates are production-ready and support standard deployment:Next.js Deployment
Vite Deployment
dist folder with any static hosting service.
Template Comparison
| Template | Build Tool | SSR | TypeScript | Best For |
|---|---|---|---|---|
| Next.js App Router | Next.js | Yes | Yes | Full-stack apps, SEO-critical sites |
| Vite | Vite | No | Yes | Fast development, SPAs |
| Remix | Remix | Yes | Yes | Data-driven applications |
| Create React App | Webpack | No | Yes | Traditional React apps |
| Gatsby | Webpack | Yes | No | Static sites, blogs |
| Express SSR | Webpack | Yes | No | Custom server requirements |
Next Steps
Component Demos
Explore interactive component demonstrations
Theming Guide
Learn advanced theme customization
API Reference
Complete API documentation for all components
GitHub Examples
Browse all example projects on GitHub