Usage with Remix
The easiest way to get started is to use one of the templates. All templates are configured correctly: they include PostCSS setup, ColorSchemeScript and other essential features. Some templates also include additional features like Jest, Storybook and ESLint.
If you are not familiar with GitHub, you can find a detailed instruction on how to bootstrap a project from a template on this page.
Remix template with full setup: Jest, Storybook, ESLint
Remix template with minimal setup – no additional tools included, only default Remix configuration
Follow Remix getting started guide guide to create new Remix application:
Choose packages that you will use in your application:
Hooks for state and UI management
Core components library: inputs, buttons, overlays, etc.
Form management library
Date inputs, calendars
Code highlight with your theme colors and styles
Rich text editor based on Tiptap
Capture files with drag and drop
Embla based carousel component
Overlay command center
Centralized modals manager
Install PostCSS plugins and postcss-preset-mantine:
postcss.config.js file at the root of your application with the following content:
Enable PostCSS in Remix
All set! Start development server:
Remix is known to have hydration mismatches when using some browser extensions that inject extra markup into the generated page, for example Google Translate, apollo dev tools, LanguageTool, etc. If you are experiencing hydration mismatches, try disabling browser extensions.
Because of this issue, you may see the following errors in the console depending on your setup:
- Warning: Prop "data-mantine-script" did not match. Server: "null" Client: "true"
- Warning: Expected server HTML to contain a matching
- Uncaught Error: Hydration failed because the initial UI does not match what was rendered on the server.
- Error: Hydration failed because the initial UI does not match what was rendered on the server.
- Uncaught Error: There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering.
Currently, Remix team is not planning to fix this issue. If you are experiencing hydration mismatches, try opening the same page in incognito mode (usually extensions are disabled in incognito mode) or disabling browser extensions.