<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Paul Gildea</title>
    <description>The latest articles on DEV Community by Paul Gildea (@paulgildea).</description>
    <link>https://dev.to/paulgildea</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F839529%2Faccda9be-e2e6-4bff-9fce-bae341bfdd08.jpeg</url>
      <title>DEV Community: Paul Gildea</title>
      <link>https://dev.to/paulgildea</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/paulgildea"/>
    <language>en</language>
    <item>
      <title>Fluent Insights EP4: Slots</title>
      <dc:creator>Paul Gildea</dc:creator>
      <pubDate>Tue, 29 Nov 2022 19:10:52 +0000</pubDate>
      <link>https://dev.to/paulgildea/fluent-insights-ep4-slots-2d0l</link>
      <guid>https://dev.to/paulgildea/fluent-insights-ep4-slots-2d0l</guid>
      <description>&lt;p&gt;Fluent UI Insights is a series that describes the design and decisions behind the Fluent UI design system.&lt;/p&gt;

&lt;p&gt;In the fourth episode, members of the Fluent UI team explain implementation details and context behind APIs in Fluent UI React v9: slots, JSX children and triggers.&lt;/p&gt;

&lt;p&gt;In this video the team covers a ton of history around slots and their evolution to what they are in Fluent UI React.&lt;/p&gt;

&lt;p&gt;Timestamps:&lt;br&gt;
00:00 – Bloopers&lt;br&gt;
00:22 – Intention and motivation for slots&lt;br&gt;
01:53 – Slots v1 in Semantic UI React&lt;br&gt;
03:33 – Slots v2 in Stardust UI React&lt;br&gt;
04:42 – Slots v3 in Fluent UI React v9&lt;br&gt;
06:04 – Component groups: collections and elements&lt;br&gt;
06:50 – Collections API in Semantic UI React &lt;br&gt;
07:45 – JSX children to define components&lt;br&gt;
08:11 – Issues with React Context and useContextSelector&lt;br&gt;
09:03 – Limitations of JSX approach&lt;br&gt;
10:43 – Connection between a host component and children&lt;br&gt;
11:33 – Why triggers API is needed?&lt;br&gt;
12:35 – Triggers API journey&lt;br&gt;
13:24 – Triggers API in Fluent UI React v9&lt;br&gt;
14:36 – Limitations of Triggers API&lt;br&gt;
14:56 – Summary of the episode&lt;br&gt;
15:27 – Bloopers&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/uxuIJlYmKGk"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Check out slots in action with this simple post on how to use them:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/paulgildea" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rvSWGN72--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--Ju7Bse5u--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/839529/accda9be-e2e6-4bff-9fce-bae341bfdd08.jpeg" alt="paulgildea"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/paulgildea/using-slots-with-fluent-ui-react-v9-jf1" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Using Slots with Fluent UI React v9&lt;/h2&gt;
      &lt;h3&gt;Paul Gildea ・ Jul 8 ・ 5 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#fluentui&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#tutorial&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#react&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;As always let us know what kind of content you want see from Fluent - UI React by visiting us on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/microsoft/fluentui"&gt;https://github.com/microsoft/fluentui&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docs: &lt;a href="https://react.fluentui.dev"&gt;https://react.fluentui.dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Twitter: &lt;a href="https://twitter.com/fluentui"&gt;https://twitter.com/fluentui&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
      <category>fluent</category>
    </item>
    <item>
      <title>What's new with Fluent UI React v9: October Update</title>
      <dc:creator>Paul Gildea</dc:creator>
      <pubDate>Wed, 19 Oct 2022 15:21:50 +0000</pubDate>
      <link>https://dev.to/paulgildea/whats-new-with-fluent-ui-react-v9-october-update-3f03</link>
      <guid>https://dev.to/paulgildea/whats-new-with-fluent-ui-react-v9-october-update-3f03</guid>
      <description>&lt;h2&gt;
  
  
  Highlights
&lt;/h2&gt;

&lt;p&gt;First, we recommend folks checkout our latest update on the &lt;a href="https://dev.to/paulgildea/fluent-ui-react-component-lifecycle-29n5"&gt;Component Lifecycle Process&lt;/a&gt; and our &lt;a href="https://github.com/microsoft/fluentui/wiki/Fluent-UI-React-v9-Component-Roadmap"&gt;Component Roadmap&lt;/a&gt; as it's been updated for FY23Q2.&lt;/p&gt;

&lt;p&gt;Here's what we'll cover in this post:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Added a dedicated shim package for &lt;a href="https://react.fluentui.dev/?path=/docs/migration-shims-button-actionbuttonshim--default"&gt;v8 to v9 migration&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Released new components &lt;strong&gt;in Stable&lt;/strong&gt;: &lt;a href="https://react.fluentui.dev/?path=/docs/components-dialog--default"&gt;Dialog&lt;/a&gt; 🎉&lt;/li&gt;
&lt;li&gt;Added new components &lt;strong&gt;in Preview&lt;/strong&gt;: &lt;a href="https://react.fluentui.dev/?path=/docs/preview-components-table--default"&gt;Table&lt;/a&gt;, &lt;a href="https://react.fluentui.dev/?path=/docs/preview-components-field--default"&gt;Field&lt;/a&gt;, &lt;a href="https://react.fluentui.dev/?path=/docs/preview-components-avatargroup--default"&gt;AvatarGroup&lt;/a&gt;, &lt;a href="https://react.fluentui.dev/?path=/docs/preview-components-persona--default"&gt;Persona&lt;/a&gt;, &lt;a href="https://react.fluentui.dev/?path=/docs/preview-components-persona--default"&gt;Toolbar&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Check out a Fluent UI React v9 based &lt;strong&gt;Teams App demo&lt;/strong&gt; at &lt;a href="https://ignite.microsoft.com/en-US/home"&gt;Ignite 2022&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Migration shims
&lt;/h2&gt;

&lt;p&gt;We know a lot of customers are migrating from Fluent UI React v8 to v9 and we're trying to balance the amount of compatibility shims we build verses building new features in v9.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BCD5nAaN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cy2bfqajgxj055yoq4hp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BCD5nAaN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cy2bfqajgxj055yoq4hp.png" alt="Screenshot of Migration Shims" width="880" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So we've elevated the &lt;a href="https://react.fluentui.dev/?path=/docs/migration-shims-button-actionbuttonshim--default"&gt;Migration section&lt;/a&gt; in documentation to cover some of the common migration shims when moving from v8 to v9.&lt;/p&gt;

&lt;p&gt;Also we've released those shims in a separate &lt;a href="https://www.npmjs.com/package/@fluentui/react-migration-v8-v9"&gt;migration package&lt;/a&gt; to help you along the way.&lt;/p&gt;

&lt;p&gt;To set expectations, at this time we don't intend to shim every component in v8 (as we want customers to adopt v9), but we understand the need to having a compatibility layer for time-sensitive feature development.&lt;/p&gt;

&lt;p&gt;Let us know if there are common migration issues you've been hitting so that we help smooth out the experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  New components in stable
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Dialog
&lt;/h3&gt;

&lt;p&gt;This is our latest component to be promoted to stable! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cVYmTJBR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4hhw6xs26zvqm2drka6k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cVYmTJBR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4hhw6xs26zvqm2drka6k.png" alt="Screenshot of Dialog Component" width="880" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://dev.tourl"&gt;Dialog&lt;/a&gt; provides the fundamental building blocks components needed to create a Dialog experience:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dialog&lt;/li&gt;
&lt;li&gt;DialogTrigger&lt;/li&gt;
&lt;li&gt;DialogSurface&lt;/li&gt;
&lt;li&gt;DialogTitle&lt;/li&gt;
&lt;li&gt;DialogActions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This allows you to easily compose an experience for specific applications to customize the UX.&lt;/p&gt;

&lt;p&gt;It also provides a minimum breakpoint to reposition content within the DialogActions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tWefpIzX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lkyad97qjo1m6jza7fo6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tWefpIzX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lkyad97qjo1m6jza7fo6.png" alt="Breakpoints for small screens" width="880" height="628"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Give it a try and let us know what you think!&lt;/p&gt;

&lt;h2&gt;
  
  
  New components in preview
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: These components are currently under development and are subject to change.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Table
&lt;/h3&gt;

&lt;p&gt;This component has been a long time coming and we're making great progress.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZD4bUiHz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zw3z5r35ul1ztqrgxr28.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZD4bUiHz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zw3z5r35ul1ztqrgxr28.png" alt="Screenshot of Table component" width="880" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Leveraging the composition-based principles already in the UI library, the &lt;a href="https://react.fluentui.dev/?path=/docs/preview-components-table--default"&gt;Table&lt;/a&gt; component is a way for developers to build a "DataGrid" like experience and compose in the functionality that's only necessary for your application.&lt;/p&gt;

&lt;p&gt;We've been experimenting with a hooks base approach that allows you to add things like sorting, filtering, and selection. Meaning, you can spare a little bit on bundle size by including only the things you want.&lt;/p&gt;

&lt;p&gt;Stay tuned, when we're ready, we'll provide a more in-depth post on using the table component in the future!&lt;/p&gt;

&lt;h3&gt;
  
  
  Field
&lt;/h3&gt;

&lt;p&gt;This component is the next iteration in supporting form based scenarios. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8A5etD87--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7bs1h1255c20e9som380.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8A5etD87--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7bs1h1255c20e9som380.png" alt="Screenshot of Field Component" width="880" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you recall my previous post on using &lt;a href="https://dev.to/paulgildea/fluent-ui-react-v9-with-formik-and-yup-523g"&gt;Fluent UI React v9 with Formik and Yup&lt;/a&gt;, I had to implement my own "ErrorText" component to handle the validation UX. &lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/paulgildea" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rvSWGN72--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--Ju7Bse5u--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/839529/accda9be-e2e6-4bff-9fce-bae341bfdd08.jpeg" alt="paulgildea"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/paulgildea/fluent-ui-react-v9-with-formik-and-yup-523g" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Fluent UI React v9 with Formik and Yup&lt;/h2&gt;
      &lt;h3&gt;Paul Gildea ・ Jul 15 ・ 3 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#fluentui&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#react&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#tutorial&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;Now with the addition of the &lt;a href="https://react.fluentui.dev/?path=/docs/preview-components-field--default"&gt;Field&lt;/a&gt; component, that validation UX is provided straight out of the UI library. &lt;/p&gt;

&lt;p&gt;Coming up, an updated post once field hits stable. For more details on the rest of the preview components, head over to: &lt;a href="https://react.fluentui.dev"&gt;https://react.fluentui.dev&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Fluent UI React v9 at Ignite 2022
&lt;/h2&gt;

&lt;p&gt;This year, I had the opportunity to demo a Teams App leveraging Fluent UI React v9 to &lt;a href="https://learn.microsoft.com/en-us/microsoftteams/platform/m365-apps/extend-m365-teams-personal-tab?tabs=manifest-teams-toolkit"&gt;extend it across M365 to Outlook and Office.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Lc8luxBh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hpjti4tyb5orw8p12wjz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Lc8luxBh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hpjti4tyb5orw8p12wjz.png" alt="Ignite Demo" width="880" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Be sure to check out the breakout session, &lt;a href="https://ignite.microsoft.com/en-US/sessions/d5d64b26-a01f-40c9-b259-92cb99a9e16e?source=sessions"&gt;from low code to pro code: building and buying collaborative apps to power an evolving workplace&lt;/a&gt; to see Fluent UI React v9 in action.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://ignite.microsoft.com/en-US/sessions/d5d64b26-a01f-40c9-b259-92cb99a9e16e" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--UdjTW2Ox--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://eventtools.event.microsoft.com/ignite2022/FY23_Ignite2022_Metadata_Thumbnail_1200x630px_nodates.png" height="462" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://ignite.microsoft.com/en-US/sessions/d5d64b26-a01f-40c9-b259-92cb99a9e16e" rel="noopener noreferrer" class="c-link"&gt;
          Microsoft Ignite
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Save the date and explore the latest innovations, learn from product experts and level up your skillset – join us to help shape the future of tech. 
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--TM-uqV8Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://eventtools.event.microsoft.com/ignite2022-prod/favicon.ico" width="128" height="128"&gt;
        ignite.microsoft.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;If you've reached the bottom of this post, thank you! Our team is proud of the work put in this month and we welcome your feedback.&lt;/p&gt;

&lt;p&gt;Have questions? Don't hesitate to reach out on:&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/microsoft/fluentui"&gt;https://github.com/microsoft/fluentui&lt;/a&gt;&lt;br&gt;
Docs: &lt;a href="https://react.fluentui.dev"&gt;https://react.fluentui.dev&lt;/a&gt;&lt;br&gt;
Twitter: &lt;a href="https://twitter.com/fluentui"&gt;https://twitter.com/fluentui&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Fluent UI React Component Lifecycle</title>
      <dc:creator>Paul Gildea</dc:creator>
      <pubDate>Mon, 17 Oct 2022 17:58:36 +0000</pubDate>
      <link>https://dev.to/paulgildea/fluent-ui-react-component-lifecycle-29n5</link>
      <guid>https://dev.to/paulgildea/fluent-ui-react-component-lifecycle-29n5</guid>
      <description>&lt;h2&gt;
  
  
  The high level process
&lt;/h2&gt;

&lt;p&gt;When developing components for Fluent UI React v9, each component passes through a series of development phases and then is finally released in the UI Library.&lt;/p&gt;

&lt;p&gt;It's broken down into 3 distinct phases: Research, Unstable, Stable&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GPIPUFP9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wlzim76bgirtbx3j3iyl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GPIPUFP9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wlzim76bgirtbx3j3iyl.png" alt="Component development lifecycle for Components" width="880" height="237"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next we'll break down each phase into more detail.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔍 Research
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mMJ-KAc2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dvrr6vaphunwolb0txhn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mMJ-KAc2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dvrr6vaphunwolb0txhn.png" alt="OpenUI Research" width="880" height="554"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;During the Research phase, Engineering partners with Product and Design to understand the scope of the component features, audit other UI libraries for industry standard patterns, and scaffold out the API. &lt;/p&gt;

&lt;p&gt;The main criteria for going into the Research phase is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A scaffolded/prototyped component within the defined feature scope&lt;/li&gt;
&lt;li&gt;Relative high confidence estimation on when the component will reach the next phase on a quarter boundary&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The thought process here is that during the Research phase, Engineering has prototyped and discovered a majority of the boundaries of the component. This gives us a higher confidence estimation so that partner teams can dependency plan for their own product work.&lt;/p&gt;

&lt;h3&gt;
  
  
  ⚠️ Unstable
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--frCB869Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wukxxg4e63nq6799kmrj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--frCB869Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wukxxg4e63nq6799kmrj.png" alt="Example of Unstable component" width="880" height="261"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The main criteria for moving from Research to an Unstable component is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Component exported via the unstable deep import&lt;/li&gt;
&lt;li&gt;Component has a majority of the feature set complete, but may still be added or removed&lt;/li&gt;
&lt;li&gt;Relative high confidence estimation on when the component will reach the next phase on a quarter boundary&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;During the Unstable phase, our engineers continue to partner with Design and Product to make sure the component meets a high bar for quality and has the right features. Part of that may include some unannounced API removals so teams should proceed with extreme caution before adopting an unstable component. We generally recommend against shipping these it to production.&lt;/p&gt;

&lt;p&gt;Unstable doesn't mean the component is low quality. It's where we "battle test" it within a real Product to ensure it meets the needs or our stake holders.&lt;/p&gt;

&lt;p&gt;Feeling up to adopting an unstable component? Great! Take steps to ensure breaking changes don't get shipped to your users, and let us know so we can form a tight feedback loop.&lt;/p&gt;

&lt;h3&gt;
  
  
  🎉 Stable
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yo-UWnE0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/40jgaoruet3sm1jgjbyj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yo-UWnE0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/40jgaoruet3sm1jgjbyj.png" alt="Example of a Stable Button" width="880" height="216"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;During the Stable phase, Engineering finalizes with Design and Product for the delivery of the component. This means that the component is ready to be used by any developers, has a stable API, has been validated for accessibility, and is exported in the UI library. The component is essentially "done" and ready for prime time.&lt;/p&gt;

&lt;p&gt;The main criteria for moving from Unstable to Stable phase is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Component exported from the top level of the UI library&lt;/li&gt;
&lt;li&gt;Component is design and feature complete&lt;/li&gt;
&lt;li&gt;Future API changes will occur according to semver&lt;/li&gt;
&lt;li&gt;Component can be used in Production&lt;/li&gt;
&lt;li&gt;The component has gone through a long list of testing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Essentially the component is ready to be used. &lt;/p&gt;

&lt;h2&gt;
  
  
  Estimation and Timelines
&lt;/h2&gt;

&lt;p&gt;So if you were doing the math, the team tends to estimate component completion from start to finish for roughly 2 quarters. This is highly dependent on the complexity of the component, but that gives partner teams enough time to plan and sets expectations on timelines. We also check-in mid-quarter to notify any changes to the schedule as that should give runway to adapt to any changes.&lt;/p&gt;

&lt;p&gt;This is just an overview of the general process and requirements, but if you want to get into some of the details, check out the work that's gone into the &lt;a href="https://github.com/microsoft/fluentui/issues/19336"&gt;Card component epic&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you're reading the bottom of this post, thank you! Our team wants to hear your feedback.&lt;/p&gt;

&lt;p&gt;If you have any questions, don't hesitate to reach out on:&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/microsoft/fluentui"&gt;https://github.com/microsoft/fluentui&lt;/a&gt;&lt;br&gt;
Docs: &lt;a href="https://react.fluentui.dev"&gt;https://react.fluentui.dev&lt;/a&gt;&lt;br&gt;
Twitter: &lt;a href="https://twitter.com/fluentui"&gt;https://twitter.com/fluentui&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>react</category>
      <category>fluentui</category>
    </item>
    <item>
      <title>Fluent UI Insights EP3: Griffel</title>
      <dc:creator>Paul Gildea</dc:creator>
      <pubDate>Mon, 19 Sep 2022 17:08:43 +0000</pubDate>
      <link>https://dev.to/paulgildea/fluent-ui-insights-ep3-griffel-55l7</link>
      <guid>https://dev.to/paulgildea/fluent-ui-insights-ep3-griffel-55l7</guid>
      <description>&lt;p&gt;Fluent UI Insights is a series that describes the design and decisions behind the Fluent UI design system. &lt;/p&gt;

&lt;p&gt;In the third episode, Oleksandr from the Fluent UI team explains the implementation details and complexities behind &lt;a href="https://js.griffle.org"&gt;Griffel&lt;/a&gt;. Griffel is a CSS-in-JS used in Fluent UI React v9 and features ahead-of-time compilation.&lt;/p&gt;

&lt;p&gt;In this video he covers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Requirements for styling solution&lt;/li&gt;
&lt;li&gt;Important concepts of Atomic CSS-in-JS&lt;/li&gt;
&lt;li&gt;Creating Griffel CSS-in-JS&lt;/li&gt;
&lt;li&gt;Did it all magically go smoothly? Find out more!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/edyW7t-rIUU"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Checkout the CodesandBox from the video that demonstrates LVFHA order importance:&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/lvfha-puzzle-ihbict"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;As always let us know what kind of content you want see from Fluent UI React by visiting us on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/microsoft/fluentui"&gt;https://github.com/microsoft/fluentui&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docs: &lt;a href="https://react.fluentui.dev"&gt;https://react.fluentui.dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Twitter: &lt;a href="https://twitter.com/fluentui"&gt;https://twitter.com/fluentui&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>fluentui</category>
      <category>react</category>
    </item>
    <item>
      <title>Fluent UI Insights EP2: Styling</title>
      <dc:creator>Paul Gildea</dc:creator>
      <pubDate>Fri, 26 Aug 2022 18:30:00 +0000</pubDate>
      <link>https://dev.to/paulgildea/fluent-ui-insights-ep2-styling-4p6a</link>
      <guid>https://dev.to/paulgildea/fluent-ui-insights-ep2-styling-4p6a</guid>
      <description>&lt;p&gt;Fluent UI Insights is a series that describes the design and decisions behind the Fluent UI React. In the second episode, Fluent UI Engineers Shift and Miro explain issues related to styling UI controls by sharing the requirements and also describing problems with existing solutions.&lt;/p&gt;

&lt;p&gt;In this video they cover: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSS&lt;/li&gt;
&lt;li&gt;CSS specificity&lt;/li&gt;
&lt;li&gt;BEM, CSS, CSS-in-JS&lt;/li&gt;
&lt;li&gt;The current state of things&lt;/li&gt;
&lt;li&gt;What's coming next with CSS-in-JS&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/a8TFywbXBt0"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;As always let us know what kind of content you want see from Fluent UI React by visiting us on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/microsoft/fluentui"&gt;https://github.com/microsoft/fluentui&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docs: &lt;a href="https://react.fluentui.dev"&gt;https://react.fluentui.dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Twitter: &lt;a href="https://twitter.com/fluentui"&gt;https://twitter.com/fluentui&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>fluentui</category>
      <category>react</category>
      <category>webdev</category>
      <category>css</category>
    </item>
    <item>
      <title>What's new with Fluent UI React v9?</title>
      <dc:creator>Paul Gildea</dc:creator>
      <pubDate>Tue, 02 Aug 2022 15:18:58 +0000</pubDate>
      <link>https://dev.to/paulgildea/whats-new-with-fluent-ui-react-v9-5h2d</link>
      <guid>https://dev.to/paulgildea/whats-new-with-fluent-ui-react-v9-5h2d</guid>
      <description>&lt;p&gt;After nearly two years in development, we are proud to announce the release of Fluent UI React v9 to stable version 9.0! Fluent UI React v9 is a collaboration between the Teams and Office team. &lt;/p&gt;

&lt;p&gt;This release provides a stable architecture for teams to build on and a baseline set of components to use. We have more components to build that will be coming in future. Check out what we have so far and give us feedback on our documentation site &lt;a href="https://react.fluentui.dev/" rel="noopener noreferrer"&gt;https://react.fluentui.dev/&lt;/a&gt;. And, let us know what components you're looking for on GitHub &lt;a href="https://github.com/microsoft/fluentui" rel="noopener noreferrer"&gt;https://github.com/microsoft/fluentui&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now, let's take a look at some of the top-level library features.&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance
&lt;/h2&gt;

&lt;h3&gt;
  
  
  CSS-in-JS engine provides styling performance improvements
&lt;/h3&gt;

&lt;p&gt;Fluent UI React v9 is leveraging Griffel, (&lt;a href="https://aka.ms/griffel" rel="noopener noreferrer"&gt;https://aka.ms/griffel&lt;/a&gt;) our recently open-sourced CSS-in-JS implementation. It provides near zero runtime, SSR support, and optional build time transforms to improve performance. When using Griffel, partner teams have seen render time improvements over Fluent UI React v0 and v8.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://griffel.js.org" rel="noopener noreferrer"&gt;Griffel&lt;/a&gt; is a CSS-in-JS with near-zero runtime, SSR support and styles defined with JavaScript objects.&lt;/p&gt;

&lt;p&gt;🚀   With a zero config start, Griffel has both runtime &amp;amp; build time implementations&lt;br&gt;
🔥   Optional build time transforms to improve performance&lt;br&gt;
💪   Type-safe styles via csstype&lt;br&gt;
🧩   Uses Atomic CSS to reuse styles and avoid specificity issues with CSS&lt;br&gt;
📝   Experimental CSS extraction with Webpack plugin&lt;br&gt;
🐞   Debug using Griffel DevTools extension&lt;/p&gt;
&lt;h3&gt;
  
  
  Lighter weight DOM
&lt;/h3&gt;

&lt;p&gt;When building the components for Fluent UI React v9, DOM node depth was taken into consideration as primitive components are often used in more complex UX. For example, the v9 Avatar component when compared to the v8 Persona and PersonaCoin components has 50% fewer DOM elements to represent the same output. These extra nodes add up as you use them in more complex and repeated scenarios like virtualized lists where every millisecond counts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuxjko76s2u86zm16ur1k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuxjko76s2u86zm16ur1k.png" alt="DOM element comparison between v8 and v9"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Accessibility
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwrkj2uk9h6lkg06s737y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwrkj2uk9h6lkg06s737y.png" alt="Design Spec screenshot"&gt;&lt;/a&gt;&lt;br&gt;
When designing and building the components for Fluent UI React v9, accessibility was also taken into consideration from the start. Here are the ways the product is built to meet WCAG 2.1 specifications today:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each component design spec takes into account keyboard, narrator, and high contrast definitions and each component goes through an &lt;a href="https://gist.github.com/smhigley/0f08c38758359e62f06d692a23860e63" rel="noopener noreferrer"&gt;extensive manual a11y test pass&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Where possible components are using native elements to minimize the over use of ARIA&lt;/li&gt;
&lt;li&gt;Components support high contrast out of the box&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And here are some new A11y improvements specific in v9:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Splitbutton automated test errors and screen reader bugs are fixed in v9&lt;/li&gt;
&lt;li&gt;Slider now works across both desktop and mobile screen readers&lt;/li&gt;
&lt;li&gt;v9 includes a select component wrapping the native  element&lt;/li&gt;
&lt;li&gt;Support reduced animation user settings &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Customization
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Slots
&lt;/h3&gt;

&lt;p&gt;Fluent UI React v9 internal parts of a component are called "slots." Think of the icon in a button.&lt;/p&gt;

&lt;p&gt;Each component slot is exposed as a top-level prop of the same name. A button has an "icon" prop for working with the icon slot. All anatomies specified in Fluent UI's design and engineering specs are available as slots.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F552wtzyzqecrbl29ziy1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F552wtzyzqecrbl29ziy1.png" alt="Slots example in Design Spec"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fluent UI's component design allows full control over every slot in every component through the slot API. This allows you to customize by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Passing content&lt;/li&gt;
&lt;li&gt;Passing props&lt;/li&gt;
&lt;li&gt;Changing the slot type&lt;/li&gt;
&lt;li&gt;Replacing the slot entirely&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check out this deep dive on slots in this previous post:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/paulgildea" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F839529%2Faccda9be-e2e6-4bff-9fce-bae341bfdd08.jpeg" alt="paulgildea"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/paulgildea/using-slots-with-fluent-ui-react-v9-jf1" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Using Slots with Fluent UI React v9&lt;/h2&gt;
      &lt;h3&gt;Paul Gildea ・ Jul 8 '22&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#fluentui&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#tutorial&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#react&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Design to code
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Theming support with design tokens
&lt;/h3&gt;

&lt;p&gt;Fluent UI React theming is supported by design tokens defined in the Fluent Design System. Design tokens provide a common set of semantic key/value pairs that represent the design language. This includes concepts like color palettes, typography ramps, radius ramps, spacing, etc. These are defined at the design system level allowing UI Kits and UI libraries to easily update the design language into the respective solution.&lt;/p&gt;

&lt;p&gt;The core design team has been working with the design community to provide Fluent based components that are designed to meet the needs of M365 products out of the box without the need for many style overrides. This becomes especially helpful when we share and integrate products within each other.&lt;/p&gt;

&lt;p&gt;By leveraging these tokens, it's possible to provide a default web and Teams branded themes for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Light mode&lt;/li&gt;
&lt;li&gt;Dark mode&lt;/li&gt;
&lt;li&gt;High contrast&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiaocgb2fesaoeycsli2u.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiaocgb2fesaoeycsli2u.gif" alt="Animated GIF of updating the Theme on the Fluent UI React documentation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check out this quick start post on branding light and dark modes: &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/paulgildea" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F839529%2Faccda9be-e2e6-4bff-9fce-bae341bfdd08.jpeg" alt="paulgildea"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/paulgildea/quick-branded-light-and-dark-modes-with-fluent-ui-react-v9-1pe6" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Quick branded light and dark modes with Fluent UI React v9&lt;/h2&gt;
      &lt;h3&gt;Paul Gildea ・ Jun 23 '22&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#fluentui&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#javascript&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#tutorial&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Migration
&lt;/h2&gt;

&lt;p&gt;As you can see, Fluent UI React v9 is a new UI library that has substantial improvements over v8 and v0 in the areas of performance, accessibility, customization, and design to ode. These improvements couldn't have been accomplished in a simple backwards compatible manner, so migration from v0 or v8 to v9 will take some effort. &lt;/p&gt;

&lt;p&gt;The good news is that we're here to help you with your upgrade, check out the &lt;a href="https://react.fluentui.dev/?path=/docs/concepts-upgrading-overview--page" rel="noopener noreferrer"&gt;Upgrading&lt;/a&gt; section of our documentation site for tips on getting started.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9m9fyituys5kymo29ky6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9m9fyituys5kymo29ky6.png" alt="Screenshot the of the Upgrade documentation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It covers topics like: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Component mapping and renames&lt;/li&gt;
&lt;li&gt;Color mappings between theming interfaces&lt;/li&gt;
&lt;li&gt;Component shims&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note, that in some cases it's not just a straight port of existing style overrides. The goal of the new design updates is minimizing the need of style overrides.&lt;/p&gt;

&lt;p&gt;Also, you can find component specific migration documentation within our GitHub repository that's co-located to the source code. So, if you're looking for Avatar specific guidance, you can find it here: &lt;a href="https://github.com/microsoft/fluentui/blob/master/packages/react-components/react-avatar/MIGRATION.md" rel="noopener noreferrer"&gt;https://github.com/microsoft/fluentui/blob/master/packages/react-components/react-avatar/MIGRATION.md&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We'd love to hear from you! &lt;/p&gt;

&lt;p&gt;If you're reading the bottom of this post, thank you! Our team is very proud of the work put into this release and we want to hear your feedback.&lt;/p&gt;

&lt;p&gt;If you have any questions, don't hesitate to reach out on: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/microsoft/fluentui" rel="noopener noreferrer"&gt;https://github.com/microsoft/fluentui&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docs: &lt;a href="https://react.fluentui.dev" rel="noopener noreferrer"&gt;https://react.fluentui.dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Twitter: &lt;a href="https://twitter.com/fluentui" rel="noopener noreferrer"&gt;https://twitter.com/fluentui&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>fluentui</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Creating Custom Variants with Fluent UI React v9</title>
      <dc:creator>Paul Gildea</dc:creator>
      <pubDate>Mon, 25 Jul 2022 15:55:33 +0000</pubDate>
      <link>https://dev.to/paulgildea/creating-custom-variants-with-fluent-ui-react-v9-26a1</link>
      <guid>https://dev.to/paulgildea/creating-custom-variants-with-fluent-ui-react-v9-26a1</guid>
      <description>&lt;p&gt;There are some cases in which you'll want to build a UI component variant to promote coherent UX across a product or a team of engineers. Quite often, this happens by overriding the default behaviors of the UI components available in your respective UI library, so you don't have to reinvent the wheel.&lt;/p&gt;

&lt;p&gt;This scenario is no different with Fluent UI React. We've designed the UI components to allow style overrides. The following examples will walk you through the various ways you can use CSS-in-JS to override the default styling of the UI Components and create custom variants for your application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Variant Scenario: Launch Button
&lt;/h2&gt;

&lt;p&gt;So, for this example, we're creating a "Launch Button" that has a specific set of styling that overrides the default &lt;a href=""&gt;Button&lt;/a&gt; provided by Fluent UI React. We want to keep all the built-in functionality of the &lt;code&gt;Button&lt;/code&gt; and override the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Always change the shape to be circular&lt;/li&gt;
&lt;li&gt;Always have a Rocket Icon&lt;/li&gt;
&lt;li&gt;Always change the background color of the rest, hover, and pressed states&lt;/li&gt;
&lt;li&gt;Always is a large size&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here's an example of what we want the "Launch Button" to look like:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv6odwxq4s8hvhp9ar3sk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv6odwxq4s8hvhp9ar3sk.png" alt="Screenshot of the Launch Button"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You'll notice that the overrides are always present—meaning our intent is that any consumer of this component isn't meant to be overridden themselves, thus promoting coherent UX across our theoretical product 😊. &lt;/p&gt;

&lt;p&gt;In the next sections, we'll cover various ways we can override the Fluent UI React Button component and ways to structure it for sharing across a project.&lt;/p&gt;
&lt;h2&gt;
  
  
  Option 1: Create CSS style overrides and component props
&lt;/h2&gt;

&lt;p&gt;The first option for creating a variant would be creating CSS-in-JS style overrides and configuring the props of the &lt;code&gt;Button&lt;/code&gt; component. Let's look at defining the CSS-in-JS style overrides using &lt;a href="https://griffle.js.org" rel="noopener noreferrer"&gt;Griffle&lt;/a&gt;—the default CSS-in-JS engine in Fluent UI React:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

const useLaunchButtonStyles = makeStyles({
  launchButton: {
    backgroundColor: "#ce000a",
    ...shorthands.borderColor("transparent"),
    color: tokens.colorBrandBackgroundInverted,
    ":hover": {
      backgroundColor: "#b10007",
      ...shorthands.borderColor("transparent"),
      color: tokens.colorBrandBackgroundInverted
    },
    ":hover:active": {
      backgroundColor: "#5d0b00",
      ...shorthands.borderColor("transparent"),
      color: tokens.colorNeutralForegroundOnBrand
    }
  }
});


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;We've created CSS-in-JS style definitions that overrides the &lt;code&gt;backgound-color&lt;/code&gt;, &lt;code&gt;border-color&lt;/code&gt;, and &lt;code&gt;color&lt;/code&gt; attributes of the &lt;code&gt;Button&lt;/code&gt; style. We also did this for the rest, hover, and pressed states o the button.&lt;/p&gt;

&lt;p&gt;Next, we'll use the styles hook we created and apply the class to the &lt;code&gt;Button&lt;/code&gt; component via the &lt;code&gt;className&lt;/code&gt; prop:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

const l = useLaunchButtonStyles();

&amp;lt;Button className={l.launchButton}&amp;gt;Launch&amp;lt;/Button&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Now, this only overrides the color of the &lt;code&gt;Button&lt;/code&gt; component, which means we need to add the Rocket Icon and change the &lt;code&gt;Button&lt;/code&gt; shape and size:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

const l = useLaunchButtonStyles();

&amp;lt;Button className={l.launchButton}
  icon={&amp;lt;RocketRegular /&amp;gt;}
  shape="circular"
  size="large"&amp;gt;
  Launch
&amp;lt;/Button&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;So, now we have a "Launch Button." The downside is that we need to tell any consumer that they need to configure the &lt;code&gt;Button&lt;/code&gt; component with a CSS class, an Icon, and a Shape. This means that potential consumers could either change the design or misconfigure the component to promote a consistent UX.&lt;/p&gt;

&lt;p&gt;Let's see how we can solve this with our next option!&lt;/p&gt;
&lt;h2&gt;
  
  
  Option 2: Wrapper Component with style overrides and prop configuration
&lt;/h2&gt;

&lt;p&gt;For this approach, we'll do exactly what we did in Option 1 above, but we'll wrap that up in a React Component.&lt;/p&gt;

&lt;p&gt;Note: This technique does create a virtual node, so it's not recommended to have many layers of component wrapping as that can create performance issues. For cases of simple overrides not wrapped many times over, this approach meets our needs.&lt;/p&gt;

&lt;p&gt;Once again, we'll take the same steps we did in Option 1, but wrap that up in a React Functional Component:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

const useLaunchButtonStyles = makeStyles({
  launchButton: {
    backgroundColor: "#ce000a",
    ...shorthands.borderColor("transparent"),
    color: tokens.colorBrandBackgroundInverted,
    ":hover": {
      backgroundColor: "#b10007",
      ...shorthands.borderColor("transparent"),
      color: tokens.colorBrandBackgroundInverted
    },
    ":hover:active": {
      backgroundColor: "#5d0b00",
      ...shorthands.borderColor("transparent"),
      color: tokens.colorNeutralForegroundOnBrand
    }
  }
});

const LaunchButton: React.FC&amp;lt;LaunchButtonProps&amp;gt; = () =&amp;gt; {
  const l = useLaunchButtonStyles();
  return (
    &amp;lt;Button
      icon={&amp;lt;RocketRegular /&amp;gt;}
      className={classes}
      shape="circular"
      size="large"
    &amp;gt;
      Launch
    &amp;lt;/Button&amp;gt;
  );
};

export default LaunchButton;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Now, when a consumer imports the &lt;code&gt;LaunchButton&lt;/code&gt; they get all the consistency wrapped up into a functional component:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;LaunchButton /&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;This works great in guaranteeing coherent UX across a product, but we've essentially taken away any further downstream customization to consumers. If this was your intent—you're done. Yay! 🎉 &lt;/p&gt;

&lt;p&gt;But, let's pretend someone on your team says, "The Design team wants this feature to have a green "Launch Button" in this one specific feature. How can we do that?"&lt;/p&gt;

&lt;p&gt;Well, you could create another wrapper component and call it &lt;code&gt;LaunchButtonGreen&lt;/code&gt;. However, as you imagine more and more color requests in the future, you know this isn't scalable. So, let's leverage the existing styling capabilities in the Fluent UI React components and bring that to your variant.&lt;/p&gt;

&lt;p&gt;In the next option, we'll look at allowing CSS-in-JS style overrides to let consumers control the color of the &lt;code&gt;LaunchButton&lt;/code&gt; but keep everything else fixed.&lt;/p&gt;
&lt;h2&gt;
  
  
  Option 3: Wrapper component with overrides and allowing consumer style overrides
&lt;/h2&gt;

&lt;p&gt;Now, we'll build on everything we've done in Option 2, but we'll allow consumers of the &lt;code&gt;LaunchButton&lt;/code&gt; to pass style overrides via the &lt;code&gt;className&lt;/code&gt; prop (just like we did with the Fluent UI React &lt;code&gt;Button&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;The interesting requirement we need to think about here is the order of the style overrides being applied. We'll leverage the &lt;a href="https://griffel.js.org/react/api/merge-classes" rel="noopener noreferrer"&gt;mergeClasses&lt;/a&gt; API in Griffel which merges and dedupes the atomic classes generated by &lt;a href="https://griffel.js.org/react/api/make-styles" rel="noopener noreferrer"&gt;makeStyles&lt;/a&gt; API.&lt;/p&gt;

&lt;p&gt;And, because order is important for &lt;code&gt;mergeClasses&lt;/code&gt; we'll make sure consumer styles passed in via the &lt;code&gt;className&lt;/code&gt; prop always win over the default &lt;code&gt;LaunchButton&lt;/code&gt; styles:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

const useLaunchButtonStyles = makeStyles({
  launchButton: {
    backgroundColor: "#ce000a",
    ...shorthands.borderColor("transparent"),
    color: tokens.colorBrandBackgroundInverted,
    ":hover": {
      backgroundColor: "#b10007",
      ...shorthands.borderColor("transparent"),
      color: tokens.colorBrandBackgroundInverted
    },
    ":hover:active": {
      backgroundColor: "#5d0b00",
      ...shorthands.borderColor("transparent"),
      color: tokens.colorNeutralForegroundOnBrand
    }
  }
});

export type LaunchButtonProps = Pick&amp;lt;
  React.HTMLAttributes&amp;lt;HTMLElement&amp;gt;,
  "className"
&amp;gt;;

const LaunchButton: React.FC&amp;lt;LaunchButtonProps&amp;gt; = ({ className }) =&amp;gt; {
  const l = useLaunchButtonStyles();
  const classes = mergeClasses(l.launchButton, className);

  return (
    &amp;lt;Button
      icon={&amp;lt;RocketRegular /&amp;gt;}
      className={classes}
      shape="circular"
      size="large"
    &amp;gt;
      Launch
    &amp;lt;/Button&amp;gt;
  );
};

export default LaunchButton;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Here's an usage example from a consumer overriding the &lt;code&gt;LaunchButton&lt;/code&gt; styles:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

const useLaunchButtonOverrides = makeStyles({
  overrides: {
    backgroundColor: "green"
  }
});

const o = useLaunchButtonOverrides();

&amp;lt;LaunchButton className={o.overrides} /&amp;gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Now, your variant has a similar developer experience as any other Fluent UI React component—a beautiful thing! It also gives the consumer a nice balance of customization and control over UX qualities that need to be coherent and consistent.&lt;/p&gt;

&lt;p&gt;Want to know more? Checkout the CodesandBox for the full sample:&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/component-variants-3cxw6k"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Let us know what kind of content you'd like to see from Fluent UI React by visiting us on:&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/microsoft/fluentui" rel="noopener noreferrer"&gt;https://github.com/microsoft/fluentui&lt;/a&gt;&lt;br&gt;
Docs: &lt;a href="https://react.fluentui.dev" rel="noopener noreferrer"&gt;https://react.fluentui.dev&lt;/a&gt;&lt;br&gt;
Twitter: &lt;a href="https://twitter.com/fluentui" rel="noopener noreferrer"&gt;https://twitter.com/fluentui&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Fluent UI Insights EP1: Positioning</title>
      <dc:creator>Paul Gildea</dc:creator>
      <pubDate>Fri, 22 Jul 2022 17:06:00 +0000</pubDate>
      <link>https://dev.to/paulgildea/fluent-ui-react-video-series-a3h</link>
      <guid>https://dev.to/paulgildea/fluent-ui-react-video-series-a3h</guid>
      <description>&lt;p&gt;Recently, Oleksandr on the Fluent UI React team released a deep dive video on Positioning UX. It's our first episode in a video series we're experimenting with to see how folks want to learn more about the UX library.&lt;/p&gt;

&lt;p&gt;I've linked the video below and as always let us know what kind of content you want see from Fluent UI React by visiting us on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/microsoft/fluentui"&gt;https://github.com/microsoft/fluentui&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docs: &lt;a href="https://react.fluentui.dev"&gt;https://react.fluentui.dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Twitter: &lt;a href="https://twitter.com/fluentui"&gt;https://twitter.com/fluentui&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/yhzAn4A1gbk"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>fluentui</category>
      <category>react</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Fluent UI React v9 with Formik and Yup</title>
      <dc:creator>Paul Gildea</dc:creator>
      <pubDate>Fri, 15 Jul 2022 16:23:27 +0000</pubDate>
      <link>https://dev.to/paulgildea/fluent-ui-react-v9-with-formik-and-yup-523g</link>
      <guid>https://dev.to/paulgildea/fluent-ui-react-v9-with-formik-and-yup-523g</guid>
      <description>&lt;p&gt;This post was inspired by the documentation examples from the &lt;a href="https://formik.org/docs/examples/with-material-ui" rel="noopener noreferrer"&gt;Formik&lt;/a&gt; documentation.&lt;/p&gt;

&lt;p&gt;This tutorial assumes that you have some previous experience working with &lt;a href="https://formik.org/" rel="noopener noreferrer"&gt;Formik&lt;/a&gt; and &lt;a href="https://github.com/jquense/yup" rel="noopener noreferrer"&gt;Yup&lt;/a&gt;. If you are, then this becomes an exercise of mapping formik props to corresponding Fluent UI React Components. &lt;/p&gt;

&lt;p&gt;This tutorial will cover high-level usage of Formik, but it's recommended you go read through the documentation to learn more.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Install the necessary dependencies
&lt;/h2&gt;

&lt;p&gt;For this example, it's recommended that you install the following npm dependencies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;npm install formik&lt;/code&gt; handling form data&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;npm install yup&lt;/code&gt; for value parsing and validation&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;npm install @fluentui/react-components&lt;/code&gt; - for Form components&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;npm install @fluentui/react-icons&lt;/code&gt; - for icons&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Build out your Form
&lt;/h2&gt;

&lt;p&gt;For this example we're building the following login experience and will break down composing the UI and adding in the Formik and Yup validation:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz4ri2und078n4tn2qvsr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz4ri2und078n4tn2qvsr.png" alt="Screenshot of a Login experience with Fluent UI React Components"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Compose the form layout with CSS-in-JS
&lt;/h3&gt;

&lt;p&gt;We start off with the high-level layout of the form leveraging &lt;a href="https://griffel.js.org" rel="noopener noreferrer"&gt;Griffel&lt;/a&gt;, the CSS-in-JS engine that comes with Fluent UI React. &lt;/p&gt;

&lt;p&gt;Let's start off using CSS Flexbox to lay everything out in a vertical stack with a maximum width of 480px:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

const useStyles = makeStyles({
  form: {
    display: "flex",
    flexDirection: "column",
    maxWidth: "480px"
  }
});


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Apply it to our UI using the &lt;code&gt;className&lt;/code&gt; prop on the &lt;code&gt;form&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

export default function App() {
  const c = useStyles();
  return (
    &amp;lt;FluentProvider theme={webLightTheme}&amp;gt;
        &amp;lt;form className={c.form}&amp;gt;
        &amp;lt;/form&amp;gt;
    &amp;lt;/FluentProvider&amp;gt;
  );
}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Add in Fluent UI React Components
&lt;/h3&gt;

&lt;p&gt;We'll be using the &lt;a href="https://react.fluentui.dev/?path=/docs/components-input--default" rel="noopener noreferrer"&gt;Input&lt;/a&gt;, &lt;a href="https://react.fluentui.dev/?path=/docs/components-label--default" rel="noopener noreferrer"&gt;Label&lt;/a&gt;, and &lt;a href="https://react.fluentui.dev/?path=/docs/components-button-button--default" rel="noopener noreferrer"&gt;Button&lt;/a&gt; components.&lt;/p&gt;

&lt;p&gt;Also I created a small little &lt;code&gt;ErrorText&lt;/code&gt; component to help display the error messages after validation.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

export default function App() {
  const c = useStyles();
  const inputId = useId("input");
  const passId = useId("pass");
  return (
    &amp;lt;FluentProvider theme={webLightTheme}&amp;gt;
        &amp;lt;form className={c.form}&amp;gt;
          &amp;lt;Label htmlFor={inputId} required&amp;gt;
          Email
          &amp;lt;/Label&amp;gt;
          &amp;lt;Input
            id={inputId}
            name="email"
            placeholder="hello@fluentui.dev"
          /&amp;gt;
          &amp;lt;ErrorText /&amp;gt;
          &amp;lt;Label htmlFor={passId} required&amp;gt;
          Password
          &amp;lt;/Label&amp;gt;
          &amp;lt;Input
            id={passId}
            name="password"
            type="password
           /&amp;gt;
          &amp;lt;ErrorText /&amp;gt;
          &amp;lt;Button appearance="primary" type="submit"&amp;gt;
          Login
          &amp;lt;/Button&amp;gt;
        &amp;lt;/form&amp;gt;
    &amp;lt;/FluentProvider&amp;gt;
  );
}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  3. Add in Formik and Yup
&lt;/h2&gt;

&lt;p&gt;Finally add in Formik for handling the form data and Yup for creating your form parsing and validation.&lt;/p&gt;
&lt;h3&gt;
  
  
  Declare your Yup validation
&lt;/h3&gt;

&lt;p&gt;Let's set up simple validation for the email and password entries.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

const validationSchema = yup.object({
  email: yup
    .string()
    .email("Enter a valid email")
    .required("Email is required"),
  password: yup
    .string()
    .min(8, "Password should be of minimum 8 characters length")
    .required("Password is required")
});


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Declare Formik initial values, assign the validation, and define your submit action
&lt;/h3&gt;

&lt;p&gt;For this example, &lt;code&gt;onSubmit&lt;/code&gt; will just &lt;code&gt;alert&lt;/code&gt; the values of the form, but you can imagine this could call any backend service.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

const formik = useFormik({
  initialValues: {
    email: "",
    password: ""
  },
  validationSchema: validationSchema,
  onSubmit: (values) =&amp;gt; {
    alert(JSON.stringify(values, null, 2));
  }
});


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Map Formik props to Fluent UI React Components
&lt;/h3&gt;

&lt;p&gt;This one is pretty straightforward in that you simply match the up the Formik prop with Fluent UI React Component prop.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;form onSubmit={formik.handleSubmit}&amp;gt;
  &amp;lt;Input 
    value={formik.values.email}
    onBlur={formik.handleBlur}
    onChange={formik.handleChange}
  /&amp;gt;
  ...
  &amp;lt;Button appearance="primary" type="submit"&amp;gt;Login&amp;lt;/Button&amp;gt;
&amp;lt;/form&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;You should get the idea here.&lt;/p&gt;

&lt;p&gt;As always, here's the complete CodesandBox:&lt;br&gt;
&lt;iframe src="https://codesandbox.io/embed/fluentui-formik-wzkupp"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Finally, be sure to check out the &lt;code&gt;ErrorText&lt;/code&gt; Component. It's just a React Functional Component with some CSS-in-JS, Design Tokens, Fluent UI React Icons, and HTML.&lt;/p&gt;

&lt;p&gt;Let us know what other code examples you want to see and feel free to reach out to the team!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/microsoft/fluentui" rel="noopener noreferrer"&gt;https://github.com/microsoft/fluentui&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docs: &lt;a href="https://react.fluentui.dev" rel="noopener noreferrer"&gt;https://react.fluentui.dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Twitter: &lt;a href="https://twitter.com/fluentui" rel="noopener noreferrer"&gt;https://twitter.com/fluentui&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

</description>
      <category>fluentui</category>
      <category>webdev</category>
      <category>react</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Using Slots with Fluent UI React v9</title>
      <dc:creator>Paul Gildea</dc:creator>
      <pubDate>Fri, 08 Jul 2022 18:50:26 +0000</pubDate>
      <link>https://dev.to/paulgildea/using-slots-with-fluent-ui-react-v9-jf1</link>
      <guid>https://dev.to/paulgildea/using-slots-with-fluent-ui-react-v9-jf1</guid>
      <description>&lt;p&gt;Fluent UI React v9 components have customizable parts called "slots." An example of this is the &lt;code&gt;icon&lt;/code&gt; slot of a &lt;code&gt;Button&lt;/code&gt; which lets you supply an icon to the &lt;code&gt;Button&lt;/code&gt; component.&lt;/p&gt;

&lt;p&gt;Each component has top-level prop(s) for each supported slot(s). For example, &lt;code&gt;Button&lt;/code&gt; has an &lt;code&gt;icon&lt;/code&gt; &lt;a href="https://react.fluentui.dev/?path=/docs/components-button--default#default" rel="noopener noreferrer"&gt;slot&lt;/a&gt;, while &lt;code&gt;Input&lt;/code&gt; has a &lt;code&gt;root&lt;/code&gt;, &lt;code&gt;contentBefore&lt;/code&gt;, and &lt;code&gt;contentAfter&lt;/code&gt; &lt;a href="https://react.fluentui.dev/?path=/docs/components-input--default#default" rel="noopener noreferrer"&gt;slots&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Slots are an integral part of a component's design and we refer to it as the component's anatomy. &lt;/p&gt;

&lt;p&gt;The following is a basic example of the &lt;code&gt;Button&lt;/code&gt; anatomy:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1tit92cnaq2s2iiz50uc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1tit92cnaq2s2iiz50uc.png" alt="Basic anatomy of a Button component"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above example, you can see how there's a slot allocated for icon content that sits next to the textual content of the &lt;code&gt;Button&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;The slots API give you full control over the slot allowing you to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pass content like text, images, and JSX&lt;/li&gt;
&lt;li&gt;Pass props for state, classes, and event handlers&lt;/li&gt;
&lt;li&gt;Change the type of the slot&lt;/li&gt;
&lt;li&gt;Change the slot entirely&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The next set of examples will demonstrate how to customize the &lt;code&gt;icon&lt;/code&gt; slot on the &lt;code&gt;Button&lt;/code&gt; &lt;a href="https://react.fluentui.dev/?path=/docs/components-button--default#default" rel="noopener noreferrer"&gt;component&lt;/a&gt;, but the same patterns can be used on any of the slots across the component library.&lt;/p&gt;

&lt;h2&gt;
  
  
  Passing text, images, and JSX to slots
&lt;/h2&gt;

&lt;p&gt;The easiest way to pass content to a slot is to do it directly. &lt;/p&gt;

&lt;h3&gt;
  
  
  Passing text/emoji to a Button icon slot
&lt;/h3&gt;

&lt;p&gt;JSX:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;Button icon="🚀"&amp;gt;Launch&amp;lt;/Button&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;HTML output:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;button type="button"&amp;gt;
  &amp;lt;span&amp;gt;🚀&amp;lt;/span&amp;gt;Launch
&amp;lt;/button&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Passing image/svg to a Button icon slot
&lt;/h3&gt;

&lt;p&gt;In this example we are using a wrapped SVG icons from &lt;a href="https://www.npmjs.com/package/@fluentui/react-icons" rel="noopener noreferrer"&gt;@fluentui/react-icons&lt;/a&gt;&lt;br&gt;
JSX:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;Button icon={&amp;lt;RocketRegular /&amp;gt;}&amp;gt;Launch&amp;lt;/Button&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;HTML output:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;button type="button"&amp;gt;
  &amp;lt;span&amp;gt;
    &amp;lt;svg&amp;gt;...&amp;lt;/svg&amp;gt;
  &amp;lt;/span&amp;gt;Launch
&amp;lt;/button&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Passing JSX to a Button icon slot
&lt;/h3&gt;

&lt;p&gt;JSX:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

// Just a basic count down timer
const [countDown, updateCountDown] = React.useState(10);
  setTimeout(() =&amp;gt; {
    if (countDown &amp;gt; 0) {
      updateCountDown(countDown - 1);
    } else {
      updateCountDown(10);
    }
  }, 1000);

&amp;lt;Button icon={&amp;lt;CounterBadge color="danger" count={countDown} /&amp;gt;}&amp;gt;Launch&amp;lt;/Button&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;HTML output:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;button type="button"&amp;gt;
  &amp;lt;span&amp;gt;
    &amp;lt;div&amp;gt;10&amp;lt;/div&amp;gt;
  &amp;lt;/span&amp;gt;Launch
&amp;lt;/button&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You can find the combined example on CodeSandbox:&lt;br&gt;
&lt;iframe src="https://codesandbox.io/embed/custom-slots-1dmvqx"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Passing props for state, CSS classes, and event handlers
&lt;/h2&gt;

&lt;p&gt;When you need to pass more than just content to a slot, you can leverage the object notation to pass props. Those props are added to the slot itself, as opposed to the content that goes inside the slot.&lt;/p&gt;

&lt;p&gt;For the content that gets passed in the slot you use the &lt;code&gt;children&lt;/code&gt; prop that can accept primitive values, JSX, and a render function.&lt;/p&gt;

&lt;h3&gt;
  
  
  Passing data with the data props
&lt;/h3&gt;

&lt;p&gt;JSX:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;Button
  icon={{
    children: "🚀",
    "data-foo": "bar"
  }}&amp;gt;
    Launch
&amp;lt;/Button&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;HTML output:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;button type="button"&amp;gt;
  &amp;lt;span data-foo="bar"&amp;gt;🚀&amp;lt;/span&amp;gt;Launch
&amp;lt;/button&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Passing CSS classes with className prop
&lt;/h3&gt;

&lt;p&gt;Note: This example is using &lt;a href="https://griffel.js.org" rel="noopener noreferrer"&gt;Griffel&lt;/a&gt; a CSS-in-JS engine that's used with Fluent UI React v9.&lt;/p&gt;

&lt;p&gt;JSX:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

const useStyles = makeStyles({
  slotBackground: {
    backgroundColor: tokens.colorBrandBackground,
    ...shorthands.borderRadius(tokens.borderRadiusCircular)
  }
});

const App = () =&amp;gt; {
  const c = useStyles();
  return &amp;lt;Button
          icon={{
            children: "🚀",
            className: c.slotBackground
          }}&amp;gt;
          Launch
         &amp;lt;/Button&amp;gt;
}



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;HTML output:&lt;br&gt;
Note: Griffel will generate atomic CSS &lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;button type="button"&amp;gt;
  &amp;lt;span class="..."&amp;gt;🚀&amp;lt;/span&amp;gt;Launch
&amp;lt;/button&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Passing event handlers
&lt;/h3&gt;

&lt;p&gt;In this example the event handlers are attached to the slot itself and not the content. So the counter will start when the mouse enters the slot and will stop when the mouse leaves the slot.&lt;/p&gt;

&lt;p&gt;JSX:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

const [countDown, updateCountDown] = React.useState(10);
const [count, setCount] = React.useState(false);

setTimeout(() =&amp;gt; {
  if (count) {
    if (countDown &amp;gt; 0) {
       updateCountDown(countDown - 1);
    } else {
      updateCountDown(10);
    }
  }
}, 1000);

const onStartCounter = (ev: React.MouseEvent&amp;lt;HTMLButtonElement&amp;gt;) =&amp;gt; {
  setCount(true);
};
const onStopCounter = (ev: React.MouseEvent&amp;lt;HTMLButtonElement&amp;gt;) =&amp;gt; {
  setCount(false);
};

&amp;lt;Button
  icon={{
    children: &amp;lt;CounterBadge color="danger" count={countDown} /&amp;gt;,
    onMouseEnter: onStartCounter,
    onMouseLeave: onStopCounter
  }}&amp;gt;
  Launch
&amp;lt;/Button&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;HTML output:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;button type="button"&amp;gt;
  &amp;lt;span onMouseEnter="..." onMouseLeave="..."&amp;gt;
    &amp;lt;div&amp;gt;10&amp;lt;/div&amp;gt;
  &amp;lt;/span&amp;gt;Launch
&amp;lt;/button&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;You can find the combined example on CodeSandbox:&lt;br&gt;
&lt;iframe src="https://codesandbox.io/embed/custom-slots-props-bzv6v9"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Change the type of the slot
&lt;/h2&gt;

&lt;p&gt;In the case of &lt;code&gt;Button&lt;/code&gt; the &lt;code&gt;icon&lt;/code&gt; slot is by default a &lt;code&gt;span&lt;/code&gt; element. If you need to change the type of the slot you can use the same object notation and specify the type with the &lt;code&gt;as&lt;/code&gt; property.&lt;/p&gt;

&lt;p&gt;JSX:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;Button
  icon={{
    as: "a",
    href: "#launch",
    children: "🚀"
  }}&amp;gt;
  Launch
&amp;lt;/Button&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;HTML output: &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;button type="button"&amp;gt;
  &amp;lt;a href="#launch"&amp;gt;🚀&amp;lt;/a&amp;gt;Launch
&amp;lt;/button&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;However, in most cases you might find yourself wanting to change the type of the component itself. Which is achieved the same way leveraging the top level &lt;code&gt;as&lt;/code&gt; prop on the component - because the component is a slot itself. Common use cases are for changing a &lt;code&gt;Button&lt;/code&gt; to an &lt;code&gt;anchor&lt;/code&gt; for navigational purposes like with &lt;a href="https://v5.reactrouter.com/web/guides/quick-start" rel="noopener noreferrer"&gt;react-router&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;JSX&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;Button as="a" icon="🚀"&amp;gt;Launch&amp;lt;/Button&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;HTML output:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;a&amp;gt;
  &amp;lt;span&amp;gt;🚀&amp;lt;/span&amp;gt;Launch
&amp;lt;/a&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You can find the combined example on CodeSandbox:&lt;br&gt;
&lt;iframe src="https://codesandbox.io/embed/custom-slots-type-yiunu8"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Change the slot entirely
&lt;/h2&gt;

&lt;p&gt;There are times where you many need to change the entire slot including its containing element.&lt;/p&gt;

&lt;p&gt;This is an escape hatch in the slots API, so it's highly recommended to leverage techniques whenever possible.&lt;/p&gt;

&lt;p&gt;Handing off the computed props that would have been applied to the slot is critical to being able to handle every slot override case conceivable. Without it, there are computed values locked in the component that the consumer cannot access when doing a replacement or augmentation, such as styles and states they may need to handle. An example of this is open state in an Accordion item, which is calculated by the Accordion parent and handed to the item.&lt;/p&gt;

&lt;p&gt;So keep that in mind if you head down this path 😊.&lt;/p&gt;

&lt;p&gt;JSX:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;Button
  icon={{
    children: (Icon, iconProps) =&amp;gt; {
      return "🚀";
    }
  }}&amp;gt;
  Launch
&amp;lt;/Button&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;HTML output:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;button type="button"&amp;gt;
  🚀Launch
&amp;lt;/button&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You can find the combined example on CodeSandbox:&lt;br&gt;
&lt;iframe src="https://codesandbox.io/embed/custom-slots-replacement-grjx1r"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;So there you have it. A whirlwind of use cases for customization with slots.&lt;/p&gt;

&lt;p&gt;Check out the &lt;a href="https://react.fluentui.dev/?path=/docs/concepts-developer-customizing-components-with-slots--page" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; to learn more about slots.&lt;/p&gt;

&lt;p&gt;If you want to learn more about Fluent UI React v9 reach out to us via:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/microsoft/fluentui" rel="noopener noreferrer"&gt;https://github.com/microsoft/fluentui&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docs: &lt;a href="https://react.fluentui.dev" rel="noopener noreferrer"&gt;https://react.fluentui.dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Twitter: &lt;a href="https://twitter.com/fluentui" rel="noopener noreferrer"&gt;https://twitter.com/fluentui&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

</description>
      <category>fluentui</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>react</category>
    </item>
    <item>
      <title>Quick branded light and dark modes with Fluent UI React v9</title>
      <dc:creator>Paul Gildea</dc:creator>
      <pubDate>Thu, 23 Jun 2022 07:28:17 +0000</pubDate>
      <link>https://dev.to/paulgildea/quick-branded-light-and-dark-modes-with-fluent-ui-react-v9-1pe6</link>
      <guid>https://dev.to/paulgildea/quick-branded-light-and-dark-modes-with-fluent-ui-react-v9-1pe6</guid>
      <description>&lt;p&gt;When building Teams Apps, Office Add-ins, or any kind of Microsoft 365 integration there's always a balance of retaining your apps brand and aligning with the hosting apps UX. &lt;/p&gt;

&lt;p&gt;However, if you are building an experience and your app maybe only has a brand color, then I'd recommend aligning with the hosting application UX so that your end customers have a consistent experience using your add-in, extension, or app.&lt;/p&gt;

&lt;p&gt;This can be easily achieved by using the brand theming capabilities with &lt;a href="https://react.fluentui.dev"&gt;Fluent UI React v9&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The library comes with light mode and dark modes built in with the ability to supply your own brand variants.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Create a &lt;code&gt;BrandVariants&lt;/code&gt; object
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;BrandVariant&lt;/code&gt; interface is just a color palette of 16 stops. There are tools available to create color palettes (which we are looking to make that easier in the future.) but for this example I've created a simple one here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myBrand = {
"10":"#000000",
"20":"#011800",
"30":"#002700",
"40":"#00360c",
"50":"#004612",
"60":"#005618",
"70":"#00671f",
"80":"#007826",
"90":"#218935",
"100":"#3e9949",
"110":"#59a85e",
"120":"#73b776",
"130":"#8ec68f",
"140":"#aad5a9",
"150":"#c6e4c5",
"160":"#e2f2e2"
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Create a light and dark theme
&lt;/h2&gt;

&lt;p&gt;Once you have your custom &lt;code&gt;BrandVariants&lt;/code&gt; object, then you simply create a light theme and a dark theme calling &lt;code&gt;createLightTheme&lt;/code&gt; and &lt;code&gt;createDarkTheme&lt;/code&gt; respectively.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const light = createLightTheme(myBrand);
const dark = createDarkTheme(myBrand);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Pass your &lt;code&gt;Theme&lt;/code&gt; to the &lt;code&gt;FluentProvider&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Now that you have a light and dark theme, you can pass that into the &lt;code&gt;FluentProvider&lt;/code&gt; for your application and all the components within that scope will pick up colors from the custom &lt;code&gt;BrandVariants.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;FluentProvider theme={light}&amp;gt;
  &amp;lt;Button appearance="primary"&amp;gt;Button&amp;lt;/Button&amp;gt;
  &amp;lt;Switch defaultChecked label="Switch" /&amp;gt;
  &amp;lt;TabList defaultSelectedValue="tab1"&amp;gt;
    &amp;lt;Tab value="tab1"&amp;gt;Tab 1&amp;lt;/Tab&amp;gt;
    &amp;lt;Tab value="tab2"&amp;gt;Tab 2&amp;lt;/Tab&amp;gt;
    &amp;lt;Tab value="tab3"&amp;gt;Tab 2&amp;lt;/Tab&amp;gt;
  &amp;lt;/TabList&amp;gt;
  &amp;lt;Slider defaultValue={50} /&amp;gt;
&amp;lt;/FluentProvider&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The best part here is that Fluent UI React v9 will apply the &lt;code&gt;BrandVariants&lt;/code&gt; values across the components in the rest, hover, and pressed states so that you don't need override each component individually. &lt;/p&gt;

&lt;p&gt;So there you have it. A quick way to create light and dark mode support with a splash of brand color for your Microsoft 365 apps, add-ins, and extensions.&lt;/p&gt;

&lt;p&gt;As always, you can find the full CodesandBox here:&lt;br&gt;
&lt;iframe src="https://codesandbox.io/embed/custom-theme-y90xfs"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;For more on Fluent UI React v9:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/microsoft/fluentui"&gt;https://github.com/microsoft/fluentui&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docs:  &lt;a href="https://react.fluentui.dev"&gt;https://react.fluentui.dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Twitter: &lt;a href="https://twitter.com/fluentui"&gt;https://twitter.com/fluentui&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

</description>
      <category>fluentui</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Getting Started with Fluent UI React v9</title>
      <dc:creator>Paul Gildea</dc:creator>
      <pubDate>Wed, 15 Jun 2022 04:06:48 +0000</pubDate>
      <link>https://dev.to/paulgildea/getting-started-with-fluent-ui-react-v9-36de</link>
      <guid>https://dev.to/paulgildea/getting-started-with-fluent-ui-react-v9-36de</guid>
      <description>&lt;p&gt;&lt;a href="https://aka.ms/fluent"&gt;Fluent&lt;/a&gt; is an open-source, cross-platform design system that gives designers and developers the frameworks they need to create engaging product experiences—accessibility, internationalization, and performance included.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://react.fluentui.dev"&gt;Fluent UI React v9&lt;/a&gt; is the UI library focused on React development for Microsoft 365 platforms like Teams Apps, Office Add-ins, and even stand along web app development.&lt;/p&gt;

&lt;p&gt;The following is quick tutorial to get you up and running with the latest version of the library.&lt;/p&gt;

&lt;p&gt;This tutorial assumes you have a React project up and running like &lt;a href="https://create-react-app.dev"&gt;Create React App&lt;/a&gt; and you are ready to add some UI components.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Install the npm package
&lt;/h2&gt;

&lt;p&gt;Install the component suite package with your favorite package manager&lt;/p&gt;

&lt;h3&gt;
  
  
  npm
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install @fluentui/react-components
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  yarn
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn add @fluentui/react-components
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Add a &lt;code&gt;FluentProvider&lt;/code&gt; and &lt;code&gt;Theme&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;A &lt;code&gt;FluentProvider&lt;/code&gt; and a &lt;code&gt;Theme&lt;/code&gt; are required for providing the right visual context for the UI Components so that they render properly. Without it, the components will not have any visuals.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';
import ReactDOM from 'react-dom';
import { FluentProvider, webLightTheme } from '@fluentui/react-components';

import App from './App';

ReactDOM.render(
  &amp;lt;FluentProvider theme={webLightTheme}&amp;gt;
    &amp;lt;App /&amp;gt;
  &amp;lt;/FluentProvider&amp;gt;,
  document.getElementById('root'),
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Add Components
&lt;/h2&gt;

&lt;p&gt;Fluent UI React v9 has two categories of components:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Stable - Components with stable APIs that will version according to &lt;a href="https://semver.org/"&gt;Semantic Versioning&lt;/a&gt;. These are exported from the top level package.&lt;/li&gt;
&lt;li&gt;Preview - Components with APIs that may change or may not have complete feature set. These components are exported out of the &lt;code&gt;/unstable&lt;/code&gt; deep import
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';
import ReactDOM from 'react-dom';
import { FluentProvider, webLightTheme, Button } from '@fluentui/react-components';
import { Select } from '@fluetui/react-components/unstable'; // Preview components deep import

ReactDOM.render(
  &amp;lt;FluentProvider theme={webLightTheme}&amp;gt;
    &amp;lt;Button appearance="primary"&amp;gt;Hello World!&amp;lt;/Button&amp;gt;
    &amp;lt;Select&amp;gt;
      &amp;lt;option&amp;gt;Red&amp;lt;/option&amp;gt;
      &amp;lt;option&amp;gt;Green&amp;lt;/option&amp;gt;
      &amp;lt;option&amp;gt;Blue&amp;lt;/option&amp;gt;
    &amp;lt;/Select&amp;gt;
  &amp;lt;/FluentProvider&amp;gt;,
  document.getElementById('root'),
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's all you need to get started using Fluent UI React v9.&lt;/p&gt;

&lt;p&gt;Don't forget to check out &lt;a href="https://react.fluentui.dev"&gt;https://react.fluentui.dev&lt;/a&gt; for more code samples and find out the latest on &lt;a href="https://github.com/microsoft/fluentui"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Lastly, here's a full CodeSandbox:&lt;br&gt;
&lt;iframe src="https://codesandbox.io/embed/hello-world-8978l8"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

</description>
      <category>fluentui</category>
      <category>webdev</category>
      <category>react</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
