<?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: Mary Ojo</title>
    <description>The latest articles on DEV Community by Mary Ojo (@maryojo).</description>
    <link>https://dev.to/maryojo</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%2F305721%2Fc7692254-dceb-459d-a3fd-4a4ca9fc5223.png</url>
      <title>DEV Community: Mary Ojo</title>
      <link>https://dev.to/maryojo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/maryojo"/>
    <language>en</language>
    <item>
      <title>10 useful CSS tools for Developers</title>
      <dc:creator>Mary Ojo</dc:creator>
      <pubDate>Sun, 02 Feb 2025 18:16:14 +0000</pubDate>
      <link>https://dev.to/maryojo/10-useful-css-tools-for-developers-4fnd</link>
      <guid>https://dev.to/maryojo/10-useful-css-tools-for-developers-4fnd</guid>
      <description>&lt;ol&gt;
&lt;li&gt;CSS layout generator: &lt;a href="https://layout.bradwoods.io/" rel="noopener noreferrer"&gt;https://layout.bradwoods.io/&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Useful for&lt;/strong&gt; : Anyone who wants to level up their CSS layout skills (flexbox and grids)&lt;/p&gt;

&lt;p&gt;This website is all about helping developers get better at &lt;strong&gt;CSS layouts&lt;/strong&gt; in a fun, hands-on way. Its like a playground where you can practice using &lt;strong&gt;CSS Grid&lt;/strong&gt; and &lt;strong&gt;Flexbox&lt;/strong&gt; to create cool, responsive layouts. You write code, see the results instantly, and tackle challenges that mimic real-world layout problems and whether youre just starting out or brushing up on your skills, its a great way to learn by doing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fz8uvohelpag48k9ws2hu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fz8uvohelpag48k9ws2hu.png" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. CSS Clip path generator: &lt;a href="https://bennettfeely.com/clippy/" rel="noopener noreferrer"&gt;https://bennettfeely.com/clippy/&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Useful for&lt;/strong&gt; : Getting quick and clean clip-path CSS code.&lt;/p&gt;

&lt;p&gt;This website is for &lt;strong&gt;creating cool shapes&lt;/strong&gt; on the web. Made by &lt;strong&gt;Bennett Feely&lt;/strong&gt; , this tool lets you easily generate &lt;strong&gt;CSS clip-path code&lt;/strong&gt; for all kinds of shapespolygons, circles, stars, and more. Instead of struggling with complex code, you can just tweak a few settings, copy the code, and voil! Youve got a unique shape ready to use in your design.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fplxam38s6zf8f5zen8oo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fplxam38s6zf8f5zen8oo.png" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. CSS Backgrounds &lt;a href="https://superdesigner.co/tools/css-backgrounds" rel="noopener noreferrer"&gt;https://superdesigner.co/tools/css-backgrounds&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Useful for&lt;/strong&gt; : Adding quick background patterns to the UI.&lt;/p&gt;

&lt;p&gt;This website contains a collection of over 100 free pattern backgrounds created using CSS, these patterns can be used to add textures to hero sections, as background layers/overlays, used in the footer design or hover effects for creating beautiful CSS backgrounds. Its part of the Super Designer toolkit and makes it really easy to customize the patterns and texturesall with just a few clicks. You can play around with colors, and styles to create something truly unique, and you get the clean CSS code ready to use in your project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F0p0qhr5cncmtp19d9d0n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F0p0qhr5cncmtp19d9d0n.png" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Grid garden: &lt;a href="https://cssgridgarden.com/" rel="noopener noreferrer"&gt;https://cssgridgarden.com/&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Useful for&lt;/strong&gt; : Beginners who want to learn more about CSS Grids&lt;/p&gt;

&lt;p&gt;This website is a &lt;strong&gt;playful and interactive way&lt;/strong&gt; to learn &lt;strong&gt;CSS Grid&lt;/strong&gt;. Created by &lt;strong&gt;Thomas Park&lt;/strong&gt; , it turns CSS grids into a game where you grow a garden by the code. Each level introduces new concepts, like aligning plants or watering specific plots, making it a fun and engaging way to get comfortable with CSS Grid.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F3x30hi7csapndto43z46.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F3x30hi7csapndto43z46.png" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Typescale: &lt;a href="https://typescale.com/" rel="noopener noreferrer"&gt;https://typescale.com/&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Useful for&lt;/strong&gt; : Designers and developers who want to ensure their typography is balanced and professional.&lt;/p&gt;

&lt;p&gt;This website is a great tool for creating balanced and visually appealing typography scales for your projects. It allows you to experiment with different font sizes, ratios, and scales (like the golden ratio, perfect fifth, or modular scale) to find the perfect typography hierarchy. You can preview how your text will look, adjust settings, and get the corresponding CSS code to implement it seamlessly into your website.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fzd22wjvfwnq217iqstuh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fzd22wjvfwnq217iqstuh.png" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Keyframes: &lt;a href="https://keyframes.app/animate" rel="noopener noreferrer"&gt;https://keyframes.app/animate&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Useful for&lt;/strong&gt; : Creating CSS animations to add to your websites&lt;/p&gt;

&lt;p&gt;This website is like a shortcut for creating smooth CSS animations. Its super easy to usejust tweak settings like timing, easing, and movement, and it spits out clean CSS code for you. Whether youre adding a subtle hover effect or a full-blown animation, this tool makes it really easy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fx0mhgqyp5t00shkmxqmv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fx0mhgqyp5t00shkmxqmv.png" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Haikei App: &lt;a href="https://haikei.app/" rel="noopener noreferrer"&gt;https://haikei.app/&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Useful for&lt;/strong&gt; : Modifying unique patterns &amp;amp; visuals to add to the user interface.&lt;/p&gt;

&lt;p&gt;This is a very useful tool for generating unique, customizable SVG shapes, blobs, waves, and other design elements. Its perfect for adding visual flair to your projects. With a simple interface, you can tweak colors, shapes, and patterns, and then download the assets as SVG or PNG files. Whether you need a background, a divider, or a decorative element, Haikei makes it quick and easy to create something eye-catching.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F4hg4v680opofn3qmlk3m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F4hg4v680opofn3qmlk3m.png" width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8. CSS loaders: &lt;a href="https://css-loaders.com/" rel="noopener noreferrer"&gt;https://css-loaders.com/&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Useful for&lt;/strong&gt; : Getting simple loading animations.&lt;/p&gt;

&lt;p&gt;This is a &lt;strong&gt;handy resource&lt;/strong&gt; for finding and customizing simple, ready-to-use CSS loading animations. It offers a wide variety of pre-built loaders, from simple spinners to more complex animations, all made with pure CSS. You can preview the animations, tweak the code, and easily copy it into your project to keep users engaged while content loads.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fyz8flanldkmpvawilurv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fyz8flanldkmpvawilurv.png" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Pure CSS Icons: &lt;a href="https://css.gg/" rel="noopener noreferrer"&gt;https://css.gg/&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Useful for&lt;/strong&gt; : Adding scalable icons to projects without the hassle of managing image files or external libraries. Its perfect for anyone looking for a lightweight, customizable icon solution.&lt;/p&gt;

&lt;p&gt;This is a &lt;strong&gt;minimalist icon library&lt;/strong&gt; built entirely with CSS. It offers over 700 customizable, open-source icons that are lightweight and easy to use in your projects. Each icon is designed with pure CSS, meaning no images or external dependencies are required. You can easily copy the code, adjust the size and color, and integrate the icons seamlessly into your website or app.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F8rlgm7k6filylr83mzti.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F8rlgm7k6filylr83mzti.png" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  10. CSS filters: &lt;a href="https://www.cssfilters.co/" rel="noopener noreferrer"&gt;https://www.cssfilters.co/&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Useful for&lt;/strong&gt; : Applying and testing cool effects to images using CSS filters.&lt;/p&gt;

&lt;p&gt;This is a &lt;strong&gt;visual playground&lt;/strong&gt; for experimenting with CSS filter effects. It lets you apply and customize filters like blur, grayscale, brightness, and contrast directly on an image, showing the results in real time. Once you've tweaked the effects to your liking, you can grab the CSS code and use it in your own projects. Its a simple and fun way to add creative touches to your images without needing any design software.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F5nyw7avlcm7swnv7ctku.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F5nyw7avlcm7swnv7ctku.png" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Thanks for reading!
&lt;/h2&gt;

&lt;p&gt;I hope you found this list helpful! You can bookmark and share with others. If you have any other CSS tools you consistently use, you can add it in the comments below!&lt;/p&gt;

</description>
      <category>css</category>
      <category>css3</category>
      <category>cssanimation</category>
      <category>tools</category>
    </item>
    <item>
      <title>Overriding &amp; Extending Global styles in Chakra UI</title>
      <dc:creator>Mary Ojo</dc:creator>
      <pubDate>Fri, 28 Apr 2023 09:44:54 +0000</pubDate>
      <link>https://dev.to/maryojo/overriding-extending-global-styles-in-chakra-ui-3m7c</link>
      <guid>https://dev.to/maryojo/overriding-extending-global-styles-in-chakra-ui-3m7c</guid>
      <description>&lt;h2&gt;
  
  
  What is Chakra UI
&lt;/h2&gt;

&lt;p&gt;Chakra UI is an open-source library of pre-built user interface components that simplifies web development for developers by allowing them to create functional websites quickly and easily without writing custom CSS or HTML code. These components, such as buttons, forms, and modals, are customizable and follow accessibility, usability, and responsive design best practices, making them user-friendly and accessible.&lt;/p&gt;

&lt;p&gt;Chakra UI works well with popular front-end frameworks such as React and Next.js, but it can also be integrated with other tools and libraries. Although it provides several React-specific features, it is still built on top of CSS and HTML, allowing its CSS styles and components to be used with non-React web frameworks.&lt;/p&gt;

&lt;p&gt;However, some of Chakra UI's features may not work optimally with non-React web frameworks. For example, its responsive design system relies on React's useState hook to detect screen size, so it may not work as expected without React. Additionally, Chakra UI's theming system relies on emotion, a CSS-in-JS library, so it may not work as expected.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of Chakra UI
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Theming system: With ChakraUI, you can easily customize the look and feel of your application. This means you can quickly and easily change the colour scheme, typography, and other design elements of your site to suit your style guide without having to rewrite any code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Accessibility: Chakra UI is designed with accessibility in mind, and it provides several accessibility features out of the box. For example, all components have proper aria attributes, the keyboard navigation is supported, and the colour contrast ratios comply with &lt;a href="https://www.w3.org/TR/WCAG21/" rel="noopener noreferrer"&gt;WCAG 2.1 guidelines&lt;/a&gt;. This ensures that websites built using Chakra UI are user-friendly and accessible to everyone.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use of best practices: Chakra UI is designed to follow best practices in accessibility, usability, and responsive design.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance: Best practices integrated into this library ensure your application runs quickly and efficiently. Chakra UI uses a modern and lightweight design system based on &lt;a href="https://www.styled-components.com/" rel="noopener noreferrer"&gt;styled-components&lt;/a&gt;. This allows the library to avoid heavy dependencies and ensures the CSS code is optimized for performance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Extensive features: Lazy loading and code splitting are part of the unique features ChakraUI gives developers access to. These features help to reduce the amount of code that needs to be loaded and executed by the browser, which can significantly improve page load times.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Global Styles in ChakraUI
&lt;/h2&gt;

&lt;p&gt;Since ChakraUI is built with a theming system, &lt;a href="https://chakra-ui.com/docs/styled-system/theme" rel="noopener noreferrer"&gt;default styling&lt;/a&gt; exists for all components and elements in the library. This can help ensure consistency in the appearance and behaviour of your UI components.&lt;/p&gt;

&lt;p&gt;This tutorial will guide you through the process of modifying the &lt;a href="https://chakra-ui.com/docs/styled-system/theme" rel="noopener noreferrer"&gt;default ChakraUI styling&lt;/a&gt; of any React application utilising this library by extending or overriding the global styles provided.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to modify Global Styles in Chakra UI
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Project
&lt;/h3&gt;

&lt;p&gt;To demonstrate how to modify ChakraUI, I'll be building a simple one-page website containing an &lt;a href="https://www.frontendmentor.io/challenges/order-summary-component-QlPmajDUj" rel="noopener noreferrer"&gt;Order summary component&lt;/a&gt; as shown in the image below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F7hwut1y9pzyjty7uetri.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F7hwut1y9pzyjty7uetri.jpeg" width="800" height="586"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting up ChakraUI
&lt;/h3&gt;

&lt;p&gt;In React.js, there are two ways to install ChakraUI:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;a. In a new folder:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simply run the following command in terminal
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app &amp;lt;APPNAME&amp;gt; --template @chakra-ui

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;b. Or, in a newly installed create-react-app:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Install react app&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inside the project directory, run the following in the terminal&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Setup Provider: You need to set up the &lt;code&gt;ChakraProvider&lt;/code&gt; at the root of your application. This should be in your &lt;code&gt;index.js&lt;/code&gt; file&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Using ChakraUI's default styling
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Setup the project and developed using CharaUI's default styling and this is what the codebase looks like &lt;a href="https://github.com/maryojo/order-summary-chakra-tutorial/blob/d0a00421de81a43760e93c0ba547d033c1adf658/src/App.js" rel="noopener noreferrer"&gt;https://github.com/maryojo/order-summary-chakra-tutorial/blob/d0a00421de81a43760e93c0ba547d033c1adf658/src/App.js&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Result: &lt;a href="https://644b7458337d8467791f868c--lambent-llama-1b74cc.netlify.app/" rel="noopener noreferrer"&gt;https://644b7458337d8467791f868c--lambent-llama-1b74cc.netlify.app/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Modifying global styles in ChakraUI
&lt;/h3&gt;

&lt;p&gt;Theming in Chakra UI follows the &lt;a href="https://styled-system.com/theme-specification/" rel="noopener noreferrer"&gt;Styled System Theme Specification&lt;/a&gt; approach, where a theme object defines the applications colour palette, font, breakpoints, spacing, and more.&lt;/p&gt;

&lt;p&gt;To modify the existing codebase to suit the application's theme, we'll be overriding the default font family and colours of some components&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Create a file named &lt;code&gt;Theme.js&lt;/code&gt; in the &lt;code&gt;src&lt;/code&gt; folder&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Import &lt;code&gt;extendTheme&lt;/code&gt; module in &lt;code&gt;Theme.js&lt;/code&gt; file&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a &lt;code&gt;theme&lt;/code&gt; object which would contain the formatted styles as shown below:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Export theme&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Call the theme as a prop in ChakraProvider in the index.js file&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Final result
&lt;/h3&gt;

&lt;p&gt;Any more custom styling could be added to the Theme.js file in the format shown. ChakraUI's styling could also be used to create custom styles for components.&lt;/p&gt;

&lt;p&gt;Code: &lt;a href="https://github.com/maryojo/order-summary-chakra-tutorial/blob/main/src/App.js" rel="noopener noreferrer"&gt;https://github.com/maryojo/order-summary-chakra-tutorial&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Live site: &lt;a href="https://lambent-llama-1b74cc.netlify.app/" rel="noopener noreferrer"&gt;https://lambent-llama-1b74cc.netlify.app/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Further steps
&lt;/h3&gt;

&lt;p&gt;Read more about ChakraUI's global styles from the &lt;a href="https://chakra-ui.com/docs/styled-system/global-styles" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Web accessibility: Semantics</title>
      <dc:creator>Mary Ojo</dc:creator>
      <pubDate>Sat, 22 Apr 2023 11:23:06 +0000</pubDate>
      <link>https://dev.to/maryojo/web-accessibility-semantics-806</link>
      <guid>https://dev.to/maryojo/web-accessibility-semantics-806</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Accessibility matters even on the web!&lt;/p&gt;

&lt;p&gt;The goal of web accessibility is to ensure that everyone has equal access to information, services, and a good user experience irrespective of their &lt;strong&gt;abilities&lt;/strong&gt; or &lt;strong&gt;disabilities&lt;/strong&gt;. Web accessibility refers to measures taken to ensure that all individuals inclusive of those with disabilities can access and use websites and digital content &lt;strong&gt;with ease&lt;/strong&gt;. To achieve this, websites should be created in a way that is perceivable, operable, understandable, and robust, providing access for everyone. This approach fosters inclusivity and equal opportunities for all users.&lt;/p&gt;

&lt;h3&gt;
  
  
  Semantics
&lt;/h3&gt;

&lt;p&gt;The word 'semantic' means the study of the meaning of language 😵. It helps to ensure that communication is clear and accurate by providing context and meaning to language. In the same vein, semantic HTML is the use of HTML markup in a way that accurately conveys the meaning and purpose of the content on a web page. Semantic HTML is a backbone for web accessibility. It is how accessibility is incorporated into websites.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why do we need Semantic web content?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It adds meaning to your HTML content, which lets web browsers, search engines, screen readers, RSS readers, and ultimately users understand it and easily navigate and interact.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It improves SEO. Semantic HTML makes it easier for search engines to understand the flow and content of a page. This makes your website easier to discover.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Code written in semantic HTML makes it easier for other developers to maintain and update.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Using Semantic HTML
&lt;/h2&gt;

&lt;p&gt;There are 2 major ways to give HTML content more meaning.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
### The proper use of HTML tags&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The proper use of HTML tags is crucial for providing structure and meaning to web content, making it easily understandable to both humans and machines. &lt;strong&gt;It is essential to use HTML tags in a semantically correct manner, where they accurately reflect the content and purpose of the element they are applied to.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For instance, it is semantically correct to use the &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; tag to mark up the main heading of a web page. In contrast, using a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; tag with a large font size is not semantically correct and should be avoided.&lt;/p&gt;

&lt;p&gt;By using HTML tags correctly, web content becomes more accessible to users with disabilities. An example is using the &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tag to include alternative text descriptions for images helps users with visual impairments understand the content of the image. Similarly, using the &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; tag with form elements such as text inputs and checkboxes makes it easier for screen reader users to understand the purpose of the form element and how to interact with it.&lt;/p&gt;

&lt;p&gt;In addition to the &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; tags, several other semantic HTML tags are commonly used to provide structure and meaning to web content.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt; tag is used to mark up the navigation section of a web page, while the &lt;code&gt;&amp;lt;article&amp;gt;&lt;/code&gt; tag is used to define a self-contained piece of content, such as a blog post or news article. The &lt;code&gt;&amp;lt;header&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;footer&amp;gt;&lt;/code&gt; tags are used to define the header and footer sections of a web page, respectively. The &lt;code&gt;&amp;lt;main&amp;gt;&lt;/code&gt; tag is used to define the main content of a web page, while the &lt;code&gt;&amp;lt;aside&amp;gt;&lt;/code&gt; tag is used to define content that is tangentially related to the main content, such as a sidebar or a call-to-action section.&lt;/p&gt;

&lt;p&gt;Using these tags correctly helps to make web content more accessible and understandable for all users, including those with disabilities. A comprehensive list of semantic HTML tags and their uses can be found on &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element" rel="noopener noreferrer"&gt;the MDN website&lt;/a&gt;, which provides a reference for web developers to follow when creating accessible and semantically correct web content.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
### ARIA attributes&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;ARIA stands for Accessible Rich Internet Applications. These attributes are a set of &lt;a href="https://www.w3schools.com/html/html_attributes.asp" rel="noopener noreferrer"&gt;HTML attributes&lt;/a&gt; used to define accessibility features for web content. Assistive technologies such as screen readers use the additional information provided by ARIA attributes. ARIA attributes can be used along with semantic HTML tags or whenever semantic HTML cannot be used. ARIA attributes can be used to provide additional information about the elements on a web page, specifically in four ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Roles&lt;/strong&gt; : ARIA roles define the type of element and its purpose. For example, an element can have a &lt;code&gt;role="button"&lt;/code&gt; to indicate that it is a clickable button.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This &lt;a href="https://developer.mozilla.org/en-US/docs/web/Accessibility/ARIA/Attributes" rel="noopener noreferrer"&gt;webpage&lt;/a&gt; provides a list of all ARIA roles, properties, states and labels, which have been defined by W3C (the organization that develops web standards).&lt;/p&gt;

&lt;h3&gt;
  
  
  Example showing the use of ARIA attributes
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="UTF-8"&amp;gt;
  &amp;lt;title&amp;gt;About Us&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;

  &amp;lt;div&amp;gt;
    &amp;lt;div role="banner"&amp;gt;
      &amp;lt;h1&amp;gt;About Us&amp;lt;/h1&amp;gt;
      &amp;lt;nav role="navigation"&amp;gt;
        &amp;lt;ul role="menu"&amp;gt;
          &amp;lt;li role="menuitem"&amp;gt;&amp;lt;a href="/" role="link"&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
          &amp;lt;li role="menuitem" aria-current="page"&amp;gt;&amp;lt;a href="/about" role="link"&amp;gt;About&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
          &amp;lt;li role="menuitem"&amp;gt;&amp;lt;a href="/contact" role="link"&amp;gt;Contact Us&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;/ul&amp;gt;
      &amp;lt;/nav&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;

  &amp;lt;main&amp;gt;
    &amp;lt;div&amp;gt;
      &amp;lt;div role="region"&amp;gt;
        &amp;lt;h2&amp;gt;Our Mission&amp;lt;/h2&amp;gt;
        &amp;lt;p role="paragraph"&amp;gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam auctor nisl eget augue laoreet vestibulum. Sed sit amet orci bibendum, tincidunt ex ac, euismod velit. &amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/main&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Testing web semantics using accessibility tools and resources
&lt;/h2&gt;

&lt;p&gt;There are many tools and resources which range from simple web browser extensions to accessibility testing suites that help developers create semantic and accessible web content for all users.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tools
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;HTML validators:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Screen reader emulators:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Accessibility testing tools:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;p&gt;In addition to tools, there are also many online resources available.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element" rel="noopener noreferrer"&gt;MDN doc&lt;/a&gt; mentioned above.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;a href="https://www.w3.org/WAI/standards-guidelines/wcag/" rel="noopener noreferrer"&gt;Web Content Accessibility Guidelines&lt;/a&gt; (WCAG) by the World Wide Web Consortium (W3C).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;a href="https://www.w3.org/WAI/ARIA/apg/" rel="noopener noreferrer"&gt;ARIA Authoring Practices Guide&lt;/a&gt;, which guides on how to use ARIA attributes to improve the accessibility of web content.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://html.spec.whatwg.org/dev/" rel="noopener noreferrer"&gt;The HTML Living Standard&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Web accessibility is a critical aspect of development that ensures everyone can access and use digital content. Semantic HTML is one of the fundamental building blocks of web accessibility, as it provides structure and meaning to web content. Using HTML tags in a semantically correct way is important because it helps both humans and machines understand the purpose and function of different elements on a web page. In addition to using semantic HTML tags, developers can utilize ARIA attributes to further enhance web accessibility. These attributes can define roles, states, properties, and labels for elements on a web page, making it easier for users with disabilities to interact with web content.&lt;/p&gt;

&lt;p&gt;To create more accessible web content, developers and designers can use a variety of tools and resources available online. By prioritizing web accessibility in their development or design practices, they can help ensure that everyone has equal access to digital content.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Create an image analysis app using Azure Computer Vision with React App</title>
      <dc:creator>Mary Ojo</dc:creator>
      <pubDate>Thu, 18 Aug 2022 18:38:09 +0000</pubDate>
      <link>https://dev.to/maryojo/create-an-image-analysis-app-using-azure-computer-vision-with-react-app-5374</link>
      <guid>https://dev.to/maryojo/create-an-image-analysis-app-using-azure-computer-vision-with-react-app-5374</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this tutorial, I will be creating a simple image recognition app in order to explain how to integrate Azure Computer Vision into client-side applications. You could also adapt the steps here to build similar applications using other services in Azure Computer Vision.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites:&lt;/strong&gt; Knowledge of React.js, An Azure account (you can get it free &lt;a href="https://azure.microsoft.com/en-us/free/" rel="noopener noreferrer"&gt;here&lt;/a&gt;), Github, Hosting service e.g. Netlify&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links:&lt;/strong&gt; &lt;a href="https://github.com/maryojo/react-azurevision-demo" rel="noopener noreferrer"&gt;Code&lt;/a&gt; &lt;a href="https://nimble-griffin-90126f.netlify.app/" rel="noopener noreferrer"&gt;Live Site&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1. Create and setup React App, then install dependencies
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Start by creating the react project:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app &amp;lt;APP_NAME&amp;gt;
cd &amp;lt;APP_NAME&amp;gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Delete unused default files in boilerplate e.g. App.test.js, App.css&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install Azure Computer Vision &amp;amp; MS Rest Azure npm package&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i @azure/ms-rest-azure-js @azure/cognitiveservices-computervision

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2. Setup resources on Azure
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Log in to the &lt;a href="https://portal.azure.com" rel="noopener noreferrer"&gt;Azure Portal&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://portal.azure.com/#create/Microsoft.CognitiveServicesComputerVision" rel="noopener noreferrer"&gt;Create a new Computer Vision&lt;/a&gt; resource in Azure&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fill out the form with the required information&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on 'Review+Create'&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The screen below shows after the resource has been deployed&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on manage keys to copy the API key and endpoint&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 3. Add Azure details to the local React App
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In the react app root folder, create a new file called &lt;em&gt;.env&lt;/em&gt; to store Azure access information in your local environment i.e. &lt;code&gt;&amp;lt;APP_NAME&amp;gt;/.env&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open the .gitignore file and add &lt;code&gt;.env&lt;/code&gt; to the list&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open the .env file and save the API key and endpoint here&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// &amp;lt;APP_NAME&amp;gt;/.env
REACT_APP_apiKey = &amp;lt;YOUR_API_KEY&amp;gt;
REACT_APP_endPoint = &amp;lt;YOUR_ENDPOINT&amp;gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In the terminal, run the command &lt;code&gt;npm start&lt;/code&gt; to view the app in your browser&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 4. Creating the Azure Vision Component
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Create a new folder called &lt;em&gt;components&lt;/em&gt; in &lt;code&gt;./src&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a new file called &lt;em&gt;AzureVisionService.js&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the new file, copy and paste the code below, it contains information for requesting from the API. The documentation to better understand this part of the code is &lt;a href="https://westus.dev.cognitive.microsoft.com/docs/services/computer-vision-v3-2/operations/56f91f2e778daf14a499f21f" rel="noopener noreferrer"&gt;here&lt;/a&gt;. The &lt;code&gt;describeImage&lt;/code&gt; method used is one of the available Azure Vision API methods. It describes an image with complete English sentences. Another similar method is the &lt;code&gt;analyzeImage&lt;/code&gt; method which extracts a rich set of visual features based on the image content.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ./scr/components/AzureVisionService

// Importing the Azure SDK client libraries
import { ComputerVisionClient } from '@azure/cognitiveservices-computervision';
import { ApiKeyCredentials } from '@azure/ms-rest-js';

// Authentication requirements
const key = process.env.REACT_APP_apiKey;
const endpoint = process.env.REACT_APP_endPoint;

// Cognitive service features
const options = {
    maxCandidates: 5,
    language: "en"
  };

// Describe Image from URL
export const computerVision = async (url) =&amp;gt; {

    // authenticate to Azure service
    const computerVisionClient = new ComputerVisionClient(
        new ApiKeyCredentials({ inHeader: { 'Ocp-Apim-Subscription-Key': key } }), endpoint);

    // describe image using the describeImage method
    const analysis = await computerVisionClient.describeImage(url, options)
    .then((result) =&amp;gt; {
        console.log("The result is:");
        console.log(result);
        return { "URL": url, ...result};
      })
      .catch((err) =&amp;gt; {
        console.log("An error occurred:");
        console.error(err);
        alert(err + "Upload an image with a smaller size");
      });

    // all information about image
    console.log("This is:" +analysis);
    if(analysis === undefined){
        return "There is something wrong with the image"
    }
    return { "URL": url, ...analysis};
}

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 5: Connect the AzureVision Component with the rest of the app.
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Import the required functions from the AzureVIsion Component into App.js
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ./src/App.js
import React, { useState } from 'react';
import { computerVision } from './components/AzureVisionService';

function App() {
  const [file, setFile] = useState(null);
  const [analysis, setAnalysis] = useState(null);
  const [processing, setProcessing] = useState(false);

  const handleChange = (e) =&amp;gt; {
    setFile(e.target.value)
  }
  const onFileUrlEntered = () =&amp;gt; {

    // hold UI
    setProcessing(true);
    setAnalysis(null);

    computerVision(file).then((item) =&amp;gt; {

      // reset state/form
      setAnalysis(item);
      setFile("");
      setProcessing(false);
    });

  };

  // Display JSON data in readable format
  const PrettyPrintJson = (data) =&amp;gt; {
    return (&amp;lt;div&amp;gt;&amp;lt;pre&amp;gt;{JSON.stringify(data, null, 2)}&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;);
  }

  const DisplayResults = () =&amp;gt; {
    return (
      &amp;lt;div&amp;gt;
        &amp;lt;h2&amp;gt;Computer Vision Analysis&amp;lt;/h2&amp;gt;
        &amp;lt;div&amp;gt;&amp;lt;img src={analysis.URL} height="200" border="1" alt={(analysis.description &amp;amp;&amp;amp; analysis.description.captions &amp;amp;&amp;amp; analysis.description.captions[0].text ? analysis.description.captions[0].text : "can't find caption")} /&amp;gt;&amp;lt;/div&amp;gt;
        {PrettyPrintJson(analysis)}
      &amp;lt;/div&amp;gt;
    )
  };

  //Describe image
  const Describe = () =&amp;gt; {
    return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;Describe image&amp;lt;/h1&amp;gt;
      {!processing &amp;amp;&amp;amp;
        &amp;lt;div&amp;gt;
          &amp;lt;div&amp;gt;
            &amp;lt;label&amp;gt;URL&amp;lt;/label&amp;gt;
            &amp;lt;input type="text" placeholder="Enter an image URL" size="50" onChange={handleChange}&amp;gt;&amp;lt;/input&amp;gt;
          &amp;lt;button onClick={onFileUrlEntered}&amp;gt;Describe&amp;lt;/button&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
      }
      {processing &amp;amp;&amp;amp; &amp;lt;div&amp;gt;Processing...&amp;lt;/div&amp;gt;}
      &amp;lt;hr /&amp;gt;
      {analysis &amp;amp;&amp;amp; DisplayResults()}
      &amp;lt;/div&amp;gt;
    )
  }

  return (
    &amp;lt;div&amp;gt;
      &amp;lt;Describe/&amp;gt;
    &amp;lt;/div&amp;gt;

  );
}

export default App;

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 6: Hosting your web app
&lt;/h3&gt;

&lt;p&gt;You could use any preferred hosting service like &lt;a href="https://azure.microsoft.com/en-us/services/app-service/static/" rel="noopener noreferrer"&gt;Azure Static Web Apps&lt;/a&gt;, &lt;a href="https://www.netlify.com/" rel="noopener noreferrer"&gt;Netlify&lt;/a&gt;, &lt;a href="https://vercel.com/" rel="noopener noreferrer"&gt;Vercel&lt;/a&gt;, &lt;a href="https://firebase.google.com/" rel="noopener noreferrer"&gt;Firebase&lt;/a&gt; or &lt;a href="https://www.heroku.com/" rel="noopener noreferrer"&gt;Heroku&lt;/a&gt;. For this tutorial, I'll make use of Netlify. One important thing to note is that whichever hosting platform you use, remember to add the &lt;em&gt;REACT_APP_apiKey&lt;/em&gt; and the &lt;em&gt;REACT_APP_endPoint&lt;/em&gt; to the host environment variables.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The first step here is to push the local react app to Github. Create a new &lt;em&gt;empty&lt;/em&gt; repository in Github, you should get the screen shown below&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In your local react app folder, open a new terminal. Then run the following commands&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// In bash terminal
git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/&amp;lt;USERNAME&amp;gt;/&amp;lt;REPO_NAME&amp;gt;.git
git push -u origin main

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Your code is now pushed to Github. Next, open your hosting website and import the existing project from Github.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the build and deploy setup interface, click on 'Advanced Settings' then 'Add New Variable' to store the secret keys&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then deploy your site&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your site is deployed!!&lt;/p&gt;

&lt;h3&gt;
  
  
  References:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/developer/javascript/tutorial/static-web-app-image-analysis" rel="noopener noreferrer"&gt;Microsoft Docs Image Analysis Tutorial&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.npmjs.com/package/@azure/cognitiveservices-computervision" rel="noopener noreferrer"&gt;Azure Computer Vision npm doc&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://westus.dev.cognitive.microsoft.com/docs/services/computer-vision-v3-2/operations/56f91f2e778daf14a499f21f" rel="noopener noreferrer"&gt;Azure Computer Vision API doc&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>react</category>
      <category>ai</category>
      <category>frontend</category>
      <category>project</category>
    </item>
    <item>
      <title>An Easy Way to Center a DIV both Vertically and Horizontally</title>
      <dc:creator>Mary Ojo</dc:creator>
      <pubDate>Fri, 13 Nov 2020 23:52:43 +0000</pubDate>
      <link>https://dev.to/maryojo/an-easy-way-to-center-a-div-both-vertically-and-horizontally-2a0o</link>
      <guid>https://dev.to/maryojo/an-easy-way-to-center-a-div-both-vertically-and-horizontally-2a0o</guid>
      <description>&lt;p&gt;This is a common problem that beginners face which seems to have no particular solution because there are many ways to achieve this. For almost every project I did, when starting out, I was searching the internet whenever I wanted to centre a div both horizontally and/or vertically. I came across one really &lt;strong&gt;easy way&lt;/strong&gt; to achieve this while I was doing an online course, and I have since decided to stick to this method(using the flexbox) except in distinct cases.&lt;/p&gt;

&lt;p&gt;In this article, I would describe how a div which is on a page, inside another element or div can be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Centred vertically &lt;/li&gt;
&lt;li&gt;Centered horizontally &lt;/li&gt;
&lt;li&gt;Centred both vertically and horizontally&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Centering a div vertically
&lt;/h3&gt;

&lt;p&gt;To center a div vertically, you do this:&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;!-- I want to center the div with a class of shape--&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
        &amp;lt;style&amp;gt;
           .shape{
                 width: 100px;
                 height: 100px;
                 background: green;
            }
        &amp;lt;/style&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body class="container"&amp;gt;&amp;lt;!--This is the parent element--&amp;gt;
            &amp;lt;div class="shape"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!-- This is the div to center--&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;The code above gives this as an output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fpzyusvvjw3qntdcte4nv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fpzyusvvjw3qntdcte4nv.png" alt="testtt.PNG" width="800" height="479"&gt;&lt;/a&gt;From the image above, we see that the 'shape' div is not centered vertically, to achieve this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add 'display: flex' and&lt;/li&gt;
&lt;li&gt;Add 'align-items: center' to the parent element which is the '.container' , as shown below:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  &amp;lt;head&amp;gt;
        &amp;lt;style&amp;gt;
           .shape{
              background: green;
            }
           .container{
                  display: flex;
                  align-items: center;
             } 
         /* The properties are added to the 'container' parent element */
        &amp;lt;/style&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body class="container"&amp;gt;&amp;lt;!--This is the parent element--&amp;gt;
            &amp;lt;div class="shape"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!-- This is the div to center--&amp;gt;
  &amp;lt;/body&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;This is the output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Frzuvuv88ddmi4o4xmun6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Frzuvuv88ddmi4o4xmun6.png" alt="testtttt.PNG" width="800" height="514"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The 'shape' div has been centered vertically. Next, we horizontally center the div.&lt;/p&gt;

&lt;h3&gt;
  
  
  Centering the div horizontally
&lt;/h3&gt;

&lt;p&gt;We follow the same steps above to horizontally center the div except that we now &lt;strong&gt;use 'justify-content: center' instead of 'align-items: center'&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adding the 'display: flex' and&lt;/li&gt;
&lt;li&gt;Adding 'justify-content: center' to the CSS properties of the parent element which is '.container' here.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is shown in the code below:&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;head&amp;gt;
        &amp;lt;style&amp;gt;
           .shape{
              background: green;
            }
           .container{
                  display: flex;
                  justify-content: center;
             } 
         /* The properties are added to the 'container' parent element */
        &amp;lt;/style&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body class="container"&amp;gt;&amp;lt;!--This is the parent element--&amp;gt;
            &amp;lt;div class="shape"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!-- This is the div to center--&amp;gt;
  &amp;lt;/body&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;The output below shows a div which has been centered horizontally:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fqbyf2nloj02ihcve4vom.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fqbyf2nloj02ihcve4vom.png" alt="teststst.PNG" width="800" height="531"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, we center the div both horizontally and vertically&lt;/p&gt;

&lt;h3&gt;
  
  
  Centering the div both horizontally and vertically
&lt;/h3&gt;

&lt;p&gt;This is a combination of the two initial steps, we achieve this by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adding the 'display: flex'&lt;/li&gt;
&lt;li&gt;Adding the 'align-items: center'&lt;/li&gt;
&lt;li&gt;Adding the 'justify-content: center'&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is shown below:&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;head&amp;gt;
        &amp;lt;style&amp;gt;
           .shape{
              background: green;
            }
           .container{
                  display: flex;
                  align-items: center;
                  justify-content: center;
             } 
         /* The properties are added to the 'container' parent element */
        &amp;lt;/style&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body class="container"&amp;gt;&amp;lt;!--This is the parent element--&amp;gt;
            &amp;lt;div class="shape"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!-- This is the div to center--&amp;gt;
  &amp;lt;/body&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;The output is shown here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F0qiaxk9pr87b0aa3wtum.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F0qiaxk9pr87b0aa3wtum.png" alt="divv.PNG" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We see that the div is now centered both vertically and horizontally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thanks for reading this! I hope it was really helpful, I would love to hear your comments.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>frontend</category>
    </item>
  </channel>
</rss>
