<?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: Subhashree Patra</title>
    <description>The latest articles on DEV Community by Subhashree Patra (@subha35).</description>
    <link>https://dev.to/subha35</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%2F1268173%2F225a3661-0fac-42f3-be9a-c9ecdc3e560c.JPG</url>
      <title>DEV Community: Subhashree Patra</title>
      <link>https://dev.to/subha35</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/subha35"/>
    <language>en</language>
    <item>
      <title>Grommet - A UI framework to create intuitive and visually appealing React components</title>
      <dc:creator>Subhashree Patra</dc:creator>
      <pubDate>Mon, 29 Jan 2024 11:07:23 +0000</pubDate>
      <link>https://dev.to/subha35/grommet-a-ui-framework-to-create-intuitive-and-visually-appealing-react-components-53i3</link>
      <guid>https://dev.to/subha35/grommet-a-ui-framework-to-create-intuitive-and-visually-appealing-react-components-53i3</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is Grommet ?&lt;/strong&gt;&lt;br&gt;
Grommet is a powerful UI framework for React that provides a set of pre-designed components and utilities to streamline the development of modern web applications.&lt;br&gt;
It is developed and maintained by: Hewlett Packard Enterprise (HPE)&lt;br&gt;
Grommet is ideal for businesses and developers who want to create accessible, visually appealing user interfaces with minimal effort or, use their existing codebases to create a richer, more engaging user experience.&lt;/p&gt;

&lt;p&gt;Some popular apps that are developed using Grommet are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Shopify&lt;/li&gt;
&lt;li&gt;Twilio&lt;/li&gt;
&lt;li&gt;Git hub&lt;/li&gt;
&lt;li&gt;Sony&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;How is it different from Chakra UI?&lt;/strong&gt;&lt;br&gt;
Grommet and other popular React based UI frameworks provide a collection of pre-built and pre-styled UI components for building user interfaces.&lt;br&gt;
But one of the key difference is Grommet is designed to be modern and minimalist design system, with a clean and simple aesthetic and mostly focuses on building mobile application.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The main difference  is the range of components and features offered by each framework. While Chakra UI provides limited range of components that includes unique options like modals and drawers, Grommet in the other hand offers a wide range of components, including buttons, forms, icons, menus and many more.&lt;/li&gt;
&lt;li&gt;In terms of performance and accessibility, both Chakra UI  and Grommet are well optimized and provide good support for accessibility standards. However, Chakra UI uses the &lt;a href="https://emotion.sh/docs/introduction" rel="noopener noreferrer"&gt;Emotion&lt;/a&gt; CSS-in-JS library to style its components, which can result in larger bundle size  and slower the performance compared to Grommet's inline styling approach.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key Features of Grommet&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Rich Components&lt;/li&gt;
&lt;li&gt;Flexible Layouts&lt;/li&gt;
&lt;li&gt;Accessibility&lt;/li&gt;
&lt;li&gt;Theming and Customizing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To know more about the features, visit &lt;a href="https://v2.grommet.io/" rel="noopener noreferrer"&gt;Grommet&lt;/a&gt;, &lt;a href="https://icons.grommet.io/?" rel="noopener noreferrer"&gt;Grommet Icons&lt;/a&gt;, &lt;a href="https://storybook.grommet.io/" rel="noopener noreferrer"&gt;Grommet StoryBook&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Different Layouts supported by Grommet:&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%2Fzupcsjv7lx6o0n8vsxeq.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%2Fzupcsjv7lx6o0n8vsxeq.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is a simple UI that's developed using Grommet components:&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%2F956k3fwvf7am5n1mjf1b.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%2F956k3fwvf7am5n1mjf1b.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Let's get started by setting up Grommet in your application&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Using Grommet in the react application is pretty straight-forward. You can run the below npm or yarn commands to install the Grommet package.&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%2F6iuutp7fjfmkmwi55tw9.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%2F6iuutp7fjfmkmwi55tw9.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OR&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%2Fkvv40hd318mkx0i81ulm.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%2Fkvv40hd318mkx0i81ulm.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see that we have installed styled-components while installing Grommet, its because its advisable to style the Grommet components using styled components.&lt;/p&gt;

&lt;p&gt;Now Grommet components can be used along with other frameworks like material-ui. But if you want to use Grommet alone we need to wrap the App.js with the Grommet component so that we can use the default theme settings provided by Grommet out of the box.&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%2Ffczclbjmx2qgd1ve0wb2.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%2Ffczclbjmx2qgd1ve0wb2.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here the props,&lt;br&gt;
 &lt;strong&gt;full&lt;/strong&gt; - means you want your application to cover the entire viewport of the window and its optional to pass.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;theme&lt;/strong&gt; - is the default settings provided by Grommet&lt;br&gt;
and &lt;strong&gt;themeMode&lt;/strong&gt; - is used to set the display either in Dark or Light&lt;/p&gt;

&lt;p&gt;Customizing the default theme:&lt;br&gt;
The default theme can be customized by overriding the styles as per your requirement( using a global Font or color across the application) by creating a customTheme object and passing it to the **theme **props in Grommet component.&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%2F5ujgx70sm6gq67hxofqr.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%2F5ujgx70sm6gq67hxofqr.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grommet also adheres to the WCAG guidelines&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It provides a prop called &lt;strong&gt;a11yTitle&lt;/strong&gt; which implicitly acts as an aria-label attribute and hence the developer doesn't have to explicitly pass the aria-label props in the component where needed.&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%2Fczovqsfuv0yk4modia4n.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%2Fczovqsfuv0yk4modia4n.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>react</category>
      <category>frontend</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
