Usage with create-react-app

Get started with template

The easiest way to get started is to use the template on GitHub:

  1. Open template page on GitHub
  2. Click Use this template button
  3. Clone or download the repository
  4. Install dependencies: yarn
  5. Start development server: npm start

Generate new application

Init new application:

npx create-react-app my-mantine-app --template typescript
Choose packages that you will use in your application:
PackageDescription
@mantine/hooks
Hooks for state and UI management
@mantine/core
Core components library: inputs, buttons, overlays, etc.
@mantine/form
Form management library
@mantine/dates
Date inputs, calendars
@mantine/notifications
Notifications system
@mantine/prism
Code highlight with your theme colors and styles
@mantine/rte
Rich text editor based on Quill.js
@mantine/dropzone
Capture files with drag and drop
@mantine/carousel
Embla based carousel component
@mantine/spotlight
Overlay command center
@mantine/modals
Centralized modals manager
@mantine/nprogress
Navigation progress
Install dependencies:
yarn add @mantine/core @mantine/hooks @emotion/react
npm install @mantine/core @mantine/hooks @emotion/react

Replace App.tsx with:

import { MantineProvider, Text } from '@mantine/core';
export default function App() {
return (
<MantineProvider withGlobalStyles withNormalizeCSS>
<Text>Welcome to Mantine!</Text>
</MantineProvider>
);
}

All set! Start development server:

npm run dev

Next steps