pickstack

Next.js + Mantine

100+ components and hooks (v9). This page shows exactly what pickstack adds to a Next.js project for Mantine: the packages, the new files and the changes to existing ones. Every combination is installed, built, linted and tested in CI.

$ npm create pickstack@latest my-app -- --framework next --modules mantine --yes
Customize in the configurator

Packages it adds

PackageVersionType
@mantine/core^9.8.2runtime
@mantine/hooks^9.8.2runtime
postcss^8.5.33dev
postcss-preset-mantine^1.18.0dev
postcss-simple-vars^7.0.1dev

New files

postcss.config.mjs
const config = {
  plugins: {
    "postcss-preset-mantine": {},
    "postcss-simple-vars": {
      variables: {
        "mantine-breakpoint-xs": "36em",
        "mantine-breakpoint-sm": "48em",
        "mantine-breakpoint-md": "62em",
        "mantine-breakpoint-lg": "75em",
        "mantine-breakpoint-xl": "88em",
      },
    },
  },
};

export default config;

Changes to existing files

app/about/page.tsx (changed)
⋯ 2 unchanged lines     <section className="page">       <h1 className="title">About</h1>       <p className="text">+        Built with Next.js (App Router), React 19, TypeScript, Mantine.−        Built with Next.js (App Router), React 19, TypeScript.       </p>     </section>   );⋯ 2 unchanged lines
app/layout.tsx (changed)
+import {+  ColorSchemeScript,+  MantineProvider,+  mantineHtmlProps,+} from "@mantine/core"; import type { Metadata } from "next"; import Link from "next/link"; import "./globals.css";+import "@mantine/core/styles.css";   export const metadata: Metadata = {   title: "my-app",⋯ 2 unchanged lines   export default function RootLayout({ children }: LayoutProps<"/">) {   return (+    <html lang="en" {...mantineHtmlProps}>+      <head>+        <ColorSchemeScript />+      </head>−    <html lang="en">       <body>+        <MantineProvider>+          <main className="app">+            <nav className="nav">+              <Link className="link" href="/">+                Home+              </Link>+              <Link className="link" href="/about">+                About+              </Link>+            </nav>+            {children}+          </main>+        </MantineProvider>−        <main className="app">−          <nav className="nav">−            <Link className="link" href="/">−              Home−            </Link>−            <Link className="link" href="/about">−              About−            </Link>−          </nav>−          {children}−        </main>       </body>     </html>   );⋯ 2 unchanged lines
components/Counter.tsx (changed)
 "use client";  +import { Button, Card, Group, Text, Title } from "@mantine/core"; import { useState } from "react";   export default function Counter() {   const [count, setCount] = useState(0);     return (+    <Card withBorder shadow="sm" radius="md" padding="xl" miw={240} ta="center">+      <Title order={2} size="h4">+        Counter+      </Title>+      <Text fz={48} fw={700} style={{ fontVariantNumeric: "tabular-nums" }}>+        {count}+      </Text>+      <Group justify="center" mt="md">+        <Button variant="default" onClick={() => setCount((n) => n - 1)}>−    <div className="card">−      <p className="count">{count}</p>−      <div className="row">−        <button−          type="button"−          className="btn"−          onClick={() => setCount((n) => n - 1)}−        >           -1+        </Button>+        <Button onClick={() => setCount((n) => n + 1)}>+1</Button>+      </Group>+    </Card>−        </button>−        <button−          type="button"−          className="btn"−          onClick={() => setCount((n) => n + 1)}−        >−          +1−        </button>−      </div>−    </div>   ); }  

Project files

Related templates