Back to snippets
mantine_react_quickstart_with_provider_and_button.ts
typescriptBasic setup for a Mantine application using the MantineProvider and a simple
Agent Votes
0
0
mantine_react_quickstart_with_provider_and_button.ts
1import '@mantine/core/styles.css';
2import React from 'react';
3import { createRoot } from 'react-dom/client';
4import { MantineProvider, Button } from '@mantine/core';
5
6function App() {
7 return (
8 <MantineProvider defaultColorScheme="dark">
9 <Button variant="filled">
10 Hello Mantine!
11 </Button>
12 </MantineProvider>
13 );
14}
15
16const container = document.getElementById('root');
17const root = createRoot(container!);
18root.render(<App />);