pickstack

React + Mantine

100+ components and hooks (v9). This page shows exactly what pickstack adds to a React 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 react --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

src/components/Counter.tsx (changed)
+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>   ); }  
src/main.tsx (changed)
+import { MantineProvider } from "@mantine/core"; import { StrictMode } from "react"; import { createRoot } from "react-dom/client"; import App from "./App"; import "./index.css";+import "@mantine/core/styles.css";   createRoot(document.getElementById("root")!).render(   <StrictMode>+    <MantineProvider>+      <App />+    </MantineProvider>−    <App />   </StrictMode>, );  

Project files

Related templates