<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Posts tagged #ui</title><description>The latest posts tagged with ui on queen.raae.codes</description><link>https://queen.raae.codes/tag/ui/</link><item><title>✨ 👩‍🎨 ~ How to make the MUI Component Library your own</title><link>https://queen.raae.codes/2022-03-10-mui/</link><guid isPermaLink="true">https://queen.raae.codes/2022-03-10-mui/</guid><description>For the app side of POW! (my.usepow.app) I choose the MUI Component Library. I am not ecstatic about the choice, but it gets the job done! And MUI really…</description><pubDate>Thu, 10 Mar 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;For the app side of POW! (&lt;a href=&quot;https://my.usepow.app/login/&quot;&gt;my.usepow.app&lt;/a&gt;) I choose the &lt;a href=&quot;https://mui.com/&quot;&gt;MUI Component Library&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I am not ecstatic about the choice, but it gets the job done! And MUI really shines for more utilitarian use cases.&lt;/p&gt;
&lt;p&gt;My focus this spring is split between:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Improving POW! for our users&lt;/li&gt;
&lt;li&gt;Helping you get the most out of Gatsby&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So to free up a lot of head-space, we are standardizing on MUI across the board.&lt;/p&gt;
&lt;p&gt;This week queen.raae.codes got the MUI treatment, and as you can see, it does not look very Material UI-y...&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://queen.raae.codes&quot;&gt;&lt;img src=&quot;./queen-shot.jpg&quot; alt=&quot;Screenshot of queen.raae.codes&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A big player in that is disabling &amp;quot;elevation&amp;quot; almost everywhere!&lt;/p&gt;
&lt;p&gt;You can do it on a one-off basis:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;// On a per use basis
&amp;lt;Button disableElevation /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But that gets annoying fast, and I like to make it a global thing:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;// Globally

createTheme({
  components: {
    MuiButton: {
      defaultProps: {
        disableElevation: true,
      },
    },
  },
});
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The last approach is also suitable for making more considerable stylistic changes to the default components.&lt;/p&gt;
&lt;p&gt;Let&apos;s see how I changed the list component for queen.raae.codes:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;createTheme({
  MuiListItemText: {
    defaultProps: {
      // Change both the primary and secondary text
      secondaryTypographyProps: {
        variant: &amp;quot;overline&amp;quot;,
        gutterBottom: true,
      },
      primaryTypographyProps: {
        variant: &amp;quot;h5&amp;quot;,
        gutterBottom: true,
      },
    },
    styleOverrides: {
      // Move the secondary text to the top
      root: {
        display: &amp;quot;flex&amp;quot;,
        flexDirection: &amp;quot;column-reverse&amp;quot;,
      },
    },
  },
  MuiListItemButton: {
    styleOverrides: {
      // Add underline to emphasis it&apos;s a link
      root: {
        &amp;quot;.MuiListItemText-primary&amp;quot;: {
          textDecoration: &amp;quot;underline&amp;quot;,
          &amp;quot;&amp;amp;:hover&amp;quot;: {
            textDecoration: &amp;quot;none&amp;quot;,
          },
        },
      },
    },
  },
});
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;/subs/&quot;&gt;&lt;img src=&quot;./list.jpg&quot; alt=&quot;Before and after screenshot of the list component&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To see all the global changes I made for queen.raae.codes check out &lt;a href=&quot;https://github.com/raae/queen.raae.codes/tree/main/src/%40raae/gatsby-theme-mui&quot;&gt;the theme folder&lt;/a&gt; in its repo on GitHub.&lt;/p&gt;
&lt;p&gt;To read more about customizing MUI, check out the &lt;a href=&quot;https://mui.com/customization/how-to-customize/#main-content&quot;&gt;How to customize&lt;/a&gt; article.&lt;/p&gt;
&lt;p&gt; &lt;br&gt;
All the best,&lt;br&gt;
Queen Raae&lt;/p&gt;
&lt;p&gt; &lt;br&gt;
&lt;strong&gt;PS:&lt;/strong&gt; In &lt;a href=&quot;https://youtu.be/kzUUoglO63k&quot;&gt;today&apos;s treasure hunt&lt;/a&gt; we&apos;ll get friendly with theme shadowing 👻 and start customizing the MUI Theme for the new work-in-progress POW! marketing @GatsbyJS site ✨&lt;/p&gt;
</content:encoded></item></channel></rss>