Usage with Vite

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 run dev

Generate new application

Init new application:

yarn create vite mantine-vite --template react-ts
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/tiptap
Rich text editor based on Tiptap
@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