Learning resources
New to Material UI? Get up to speed quickly with our curated list of learning resources.
Your first component
The following code snippet demonstrates a basic Material UI app that features a <Button>
component:
<span class="token keyword">import</span> <span class="token operator">*</span> <span class="token keyword">as</span> React <span class="token keyword">from</span> <span class="token string">'react'</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> Button <span class="token keyword">from</span> <span class="token string">'@mui/material/Button'</span><span class="token punctuation">;</span>
<span class="token keyword">function</span> <span class="token function">App</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">return</span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span> <span class="token attr-name">variant</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>contained<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Hello World<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
In the interactive demo below, try changing the code and see how it affects the output. (Hint: change variant
to "outlined"
and color
to "secondary"
. For more options, see the Button
component page.)
Example projects
Visit the example projects page to see how we recommend implementing Material UI with various React libraries and frameworks like Next.js, Gatsby, Create React App, and more.
Templates
Check out our selection of basic templates to get started building your next app more quickly.
Recommended resources
Beyond our official documentation, there are countless members of our community who create fantastic tutorials and guides for working with Material UI.
The following is a curated list of some of the best third-party resources we've found for learning how to build beautiful apps with our components.
Free
Material UI v5 Crash Course video by Laith Harb: everything you need to know to start building with the latest version of Material UI.
React + Material UI - From Zero to Hero video series by The Atypical Developer: build along with this in-depth series, from basic installation through advanced component implementation.
Next.js 11 Setup with Material UI v5 by Leo Roese: learn how to integrate Material UI into your Next.js app, using Emotion as the style engine.
Material UI v5 Crash Course + Intro to React (2022 Edition) by Anthony Sistilli: how and why to use Material UI, plus guidance on theming and style customization.
Material UI v5 Tutorial Playlist by Nikhil Thadani (Indian Coders): a detailed playlist covering almost every component of Material UI with Create React App.
The Clever Dev and The Smart Devpreneur by Jon M: dozens of high-quality videos and articles digging deep into the nuts and bolts of Material UI.