# Table of Contents - [Mantine](#mantine) - [About Mantine | Mantine](#about-mantine-mantine) - [Mantine API overview | Mantine](#mantine-api-overview-mantine) - [Getting started | Mantine](#getting-started-mantine) - [Usage with Vite | Mantine](#usage-with-vite-mantine) - [Contributing to Mantine | Mantine](#contributing-to-mantine-mantine) - [Usage with Remix | Mantine](#usage-with-remix-mantine) - [Usage with Redwood | Mantine](#usage-with-redwood-mantine) - [Colors generator | Mantine](#colors-generator-mantine) - [Usage with Next.js | Mantine](#usage-with-next-js-mantine) - [Styles API | Mantine](#styles-api-mantine) - [Usage with Gatsby | Mantine](#usage-with-gatsby-mantine) - [CSS modules | Mantine](#css-modules-mantine) - [MantineProvider | Mantine](#mantineprovider-mantine) - [Polymorphic components | Mantine](#polymorphic-components-mantine) - [Icons libraries | Mantine](#icons-libraries-mantine) - [Usage with Storybook | Mantine](#usage-with-storybook-mantine) - [Theme object | Mantine](#theme-object-mantine) - [Usage with JavaScript | Mantine](#usage-with-javascript-mantine) - [CSS variables | Mantine](#css-variables-mantine) - [PostCSS preset | Mantine](#postcss-preset-mantine) - [All releases | Mantine](#all-releases-mantine) - [Color schemes | Mantine](#color-schemes-mantine) - [Usage with TypeScript | Mantine](#usage-with-typescript-mantine) - [Testing with Jest | Mantine](#testing-with-jest-mantine) - [Colors | Mantine](#colors-mantine) - [Styles overview | Mantine](#styles-overview-mantine) - [Functions reference | Mantine](#functions-reference-mantine) - [Testing with Vitest | Mantine](#testing-with-vitest-mantine) - [6.x to 7.x migration | Mantine](#6-x-to-7-x-migration-mantine) - [Responsive styles | Mantine](#responsive-styles-mantine) - [Mantine styles | Mantine](#mantine-styles-mantine) - [Vanilla extract | Mantine](#vanilla-extract-mantine) - [Usage with Sass | Mantine](#usage-with-sass-mantine) - [Default props | Mantine](#default-props-mantine) - [Global styles | Mantine](#global-styles-mantine) - [rem, em and px units | Mantine](#rem-em-and-px-units-mantine) - [CSS files list | Mantine](#css-files-list-mantine) - [style prop | Mantine](#style-prop-mantine) - [data-* attributes | Mantine](#data-attributes-mantine) - [Unstyled / headless | Mantine](#unstyled-headless-mantine) - [Usage with Emotion | Mantine](#usage-with-emotion-mantine) - [Button | Mantine](#button-mantine) --- # Mantine Build fully functional accessible web applications faster than ever – Mantine includes more than 100 customizable components and 50 hooks to cover you in any situation Free and open source All packages have MIT license, you can use Mantine in any project TypeScript based Build type safe applications, all components and hooks export types Use anywhere Mantine supports all modern frameworks: Next.js, Remix, etc. [Get started](/getting-started/) [GitHub](https://github.com/mantinedev/mantine) Sponsored by [![](https://logo.clearbit.com/metabase.com)Metabase](https://www.metabase.com) [You? ❤️\ \ Sponsor Mantine to get featured here and support the project.](https://opencollective.com/mantinedev) 100+ components --------------- Inputs 20+ input components Date pickers Calendar, date pickers, time inputs Overlays & Navigation Modal, HoverCard, Tabs, Stepper Content Accordion, Timeline Rich text editor Tiptap based rich text editor Carousel Embla based carousel Text input \* Password input \* Color input Native select ReactAngularSvelteVue Custom select Searchable select Custom multi select Autocomplete With description Every input can have description... With error ...and error Dark color scheme ----------------- ![Dark and light theme](/_next/static/media/dark-theme-image.68c24d76.png) Add dark theme to your application with just a few lines of code – Mantine exports global styles both for light and dark theme, all components support dark theme out of the box. import { MantineProvider } from '@mantine/core'; function Demo() { return ( ); } Toggle color scheme Customize components -------------------- Every Mantine component supports visual customizations with props – you can quickly prototype and experiment by modifying component props: New branch You've created new branch fix-notifications from master 2 hours ago Commits You've pushed 23 commits to fix-notifications branch 52 minutes ago Pull request You've submitted a pull request Fix incorrect notification message (#187) 34 minutes ago Code review Robert Gluesticker left a code review on your pull request 12 minutes ago Color Radius xs sm md lg xl Active Reverse active Line width Bullet size Align Left Right Demo.tsx import { Timeline } from '@mantine/core'; function Demo() { return ( {/* items */} ); } Expand code Styles overriding ----------------- Each Mantine component supports styles overriding for every internal element inside with classes or inline styles. This feature alongside other customization options allows you to implement any visual modifications to components and adapt them to fit almost any design requirements. Default slider styles 20% 50% 80% import { Slider } from '@mantine/core'; const marks = [\ { value: 20, label: '20%' },\ { value: 50, label: '50%' },\ { value: 80, label: '80%' },\ ]; function Demo() { return ; } Find elements that you need to change in styles API table | Name | Description | | --- | --- | | root | Root element | | label | Thumb label | | thumb | Thumb element | | trackContainer | Wraps track element | | track | Slider track | | bar | Track filled part | | markWrapper | Contains \`mark\` and \`markLabel\` elements | | mark | Mark displayed on track | | markLabel | Label of the associated mark, displayed below track | Then apply styles and add other props: 20% 50% 80% Demo.module.cssDemo.tsx .track { &::before { background-color: light-dark(var(--mantine-color-blue-1), var(--mantine-color-dark-3)); } } .mark { width: rem(6px); height: rem(6px); border-radius: rem(6px); transform: translateX(rem(-3px)) translateY(rem(-2px)); border-color: light-dark(var(--mantine-color-blue-1), var(--mantine-color-dark-3)); &[data-filled] { border-color: var(--mantine-color-blue-6); } } .markLabel { font-size: var(--mantine-font-size-xs); margin-bottom: rem(5px); margin-top: 0; } .thumb { height: rem(16px); width: rem(16px); background-color: var(--mantine-color-white); border-width: rem(1px); box-shadow: var(--mantine-shadow-sm); } Expand code [View more examples](/styles/styles-api/) Flexible theming ---------------- Extend default theme with any amount of additional colors, replace shadows, radius, spacing, fonts and many other properties to match your design requirements. Ocean blue button Bright pink badge import { Badge, Button, MantineProvider, createTheme } from '@mantine/core'; const theme = createTheme({ fontFamily: 'Greycliff CF, sans-serif', colors: { 'ocean-blue': ['#7AD1DD', '#5FCCDB', '#44CADC', '#2AC9DE', '#1AC2D9', '#11B7CD', '#09ADC3', '#0E99AC', '#128797', '#147885'], 'bright-pink': ['#F0BBDD', '#ED9BCF', '#EC7CC3', '#ED5DB8', '#F13EAF', '#F71FA7', '#FF00A1', '#E00890', '#C50E82', '#AD1374'], }, }); function Demo() { return ( Bright pink badge ); } Build even faster with Mantine UI 120+ responsive components built with Mantine =============================================== Build your next website even faster with premade responsive components designed and built by Mantine maintainers and community. All components are free forever for everyone. [Explore components](https://ui.mantine.dev/) [View on GitHub](https://github.com/mantinedev/ui.mantine.dev) Hooks library ------------- use-element-size Subscribe to element size changes use-debounced-value Debounce value changes use-idle Detect if user does nothing use-fullscreen Enter/exit fullscreen use-move Slide behavior over any element use-form Forms management library Resize textarea by dragging its right bottom corner Width: 0, height: 0 Demo.tsx import { useElementSize } from '@mantine/hooks'; function Demo() { const { ref, width, height } = useElementSize(); return ( <>