Materio MUI NextJS Admin Template Free

repository·main·Indexed 24 days ago

https://github.com/themeselection/materio-mui-nextjs-admin-template-free

A free, customizable MUI NextJS admin dashboard template built with Next.js App Router, MUI, and Tailwind CSS. It supports both TypeScript and JavaScript, featuring responsive layouts, theme-aware components, and a comprehensive set of UI elements including account settings, login, and registration pages. Includes built-in tools like SettingsProvider for theme management, custom Tailwind CSS tokens, and hooks for cookie and image variant handling.

Tokens
13.6K
Snippets
24
Records
81
Agent score
81%

What's inside Materio MUI NextJS Admin Template

  1. Materio Free Version Features and Included Components

    main

    The Materio Free version is a comprehensive MUI NextJS admin dashboard template. It includes:

    Core Features

    • Next.js with App Router support
    • Integrated MUI & Tailwind CSS
    • TypeScript & JavaScript support
    • ESLint (Linter) and Prettier (Formatter)
    • VSCode configuration (Settings, Extensions, Snippets)
    • Absolute Imports with aliases
    • Minified HTML & CSS, Live reload, and Cache busting
    • SEO-friendly and Production-ready

    Included Components

    • Layouts: Blank, Full, and Boxed
    • Dashboard: 1 simple dashboard
    • Pages: Account Settings, Login, Register, Forgot Password, Error, and Under Maintenance
    • UI Elements: Iconify Icons, Basic Cards, and Form Layouts
  2. Install and run Materio MUI NextJS Admin Template

    main

    Follow these steps to set up the development environment for the Materio template:

    1. Prerequisites: Ensure you have Node.js LTS installed (do not use the 'current' version).
    2. Navigate to Version Folder: Enter either the typescript-version or javascript-version directory.
    3. Install Dependencies: Run the installation command using your preferred package manager (pnpm is recommended):
      • Using pnpm: pnpm install
      • Using yarn: yarn install
      • Using npm: npm install
    4. Configure Environment: Rename the .env.example file to .env.
    5. Start Development Server: Run the dev command to start the server at http://localhost:3000:
      • Using pnpm: pnpm dev
      • Using yarn: yarn dev
      • Using npm: npm run dev
    # Example using pnpm (recommended)
    pnpm install
    pnpm dev
  3. Manage theme and layout preferences with SettingsContext

    main

    The SettingsContext provides a centralized way to manage application-wide settings, such as the color mode (e.g., light or dark). It allows you to update global settings that persist via cookies, or page-specific settings that revert when navigating away.

    Available Context Properties

    • settings: The current Settings object.
    • updateSettings(settings, options?): Updates global settings. By default, it persists changes to a cookie.
    • isSettingsChanged: A boolean indicating if the current settings differ from the initial configuration.
    • resetSettings(): Resets all settings to their initial values.
    • updatePageSettings(settings): Updates settings for the current page only. It returns a cleanup function that should be called (e.g., in a useEffect return) to revert the settings when the component unmounts.
  4. Manage vertical navigation state with VerticalNavProvider

    main

    The VerticalNavProvider component provides a context for managing the state of the vertical navigation menu, including its width, toggle status, and breakpoint responsiveness. Wrap your application (or the relevant part of the layout) with this provider to enable vertical navigation control across your components.

    State Properties

    The context exposes the following VerticalNavState properties:

    • width: The current width of the navigation.
    • isToggled: A boolean indicating if the navigation is toggled (e.g., collapsed or mobile view).
    • isBreakpointReached: Indicates if the current viewport has reached a defined breakpoint.
    • transitionDuration: The duration of the navigation transition animations.
  5. Configure OptionMenu menu items

    main

    The options prop in OptionMenu accepts an array of OptionType. Each item in the array can take one of three forms:

    1. String: A simple text menu item. Clicking it closes the menu.

      • Example: 'Simple Item'
    2. Divider Object: Renders an MUI Divider.

      • Example: { divider: true, dividerProps: { sx: { ... } } }
    3. Option Object: A complex menu item with metadata.

      • text: The label of the menu item.
      • icon: A string (class name) or a React node.
      • href: If provided, the item renders as a Link (using Next.js Link) instead of a standard MenuItem.
      • menuItemProps: Props to spread onto the MUI MenuItem (e.g., onClick, color, sx).
      • linkProps: Props to spread onto the Next.js Link component if href is present.
  6. Configure application environment variables

    main

    The Materio MUI Next.js Admin Template uses environment variables to manage application paths, URLs, and metadata. You can configure these in your .env file.

    • BASEPATH: Defines a base path for the application (e.g., if you are hosting the app in a subdirectory).
    • NEXT_PUBLIC_APP_URL: The base URL of the application. It defaults to http://localhost:3000 combined with the BASEPATH.
    • NEXT_PUBLIC_DOCS_URL: The URL pointing to the template's documentation.
    • NEXT_PUBLIC_PRO_URL: The URL for the premium version demo.
    • NEXT_PUBLIC_REPO_NAME: The name of the repository used for metadata or branding.
    # -----------------------------------------------------------------------------
    # App
    # -----------------------------------------------------------------------------
    BASEPATH=
    NEXT_PUBLIC_APP_URL=http://localhost:3000${BASEPATH}
    NEXT_PUBLIC_DOCS_URL=https://demos.themeselection.com/materio-mui-nextjs-admin-template/documentation
    NEXT_PUBLIC_PRO_URL=https://demos.themeselection.com/materio-mui-nextjs-admin-template/demo-1
    NEXT_PUBLIC_REPO_NAME=materio-mui-nextjs-admin-template-free