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 --yesCustomize in the configurator
Packages it adds
| Package | Version | Type |
|---|---|---|
@mantine/core | ^9.8.2 | runtime |
@mantine/hooks | ^9.8.2 | runtime |
postcss | ^8.5.33 | dev |
postcss-preset-mantine | ^1.18.0 | dev |
postcss-simple-vars | ^7.0.1 | dev |
New files
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
+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> ); }
+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
.gitignoreREADME.mdindex.htmlpackage.jsonpostcss.config.mjssrc/App.tsxsrc/components/Counter.tsxsrc/index.csssrc/main.tsxtsconfig.jsonvite.config.ts