<?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: Samuel Afolabi</title>
    <description>The latest articles on DEV Community by Samuel Afolabi (@samuelafolabi).</description>
    <link>https://dev.to/samuelafolabi</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%2F928749%2F1f1844af-bf77-444e-a176-8475a7f80427.jpg</url>
      <title>DEV Community: Samuel Afolabi</title>
      <link>https://dev.to/samuelafolabi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/samuelafolabi"/>
    <language>en</language>
    <item>
      <title>Create Engaging Mouse Move Effects in React with GSAP: A Step-by-Step Guide</title>
      <dc:creator>Samuel Afolabi</dc:creator>
      <pubDate>Wed, 20 Sep 2023 23:13:41 +0000</pubDate>
      <link>https://dev.to/samuelafolabi/create-engaging-mouse-move-effects-in-react-with-gsap-a-step-by-step-guide-28a6</link>
      <guid>https://dev.to/samuelafolabi/create-engaging-mouse-move-effects-in-react-with-gsap-a-step-by-step-guide-28a6</guid>
      <description>&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;This article was written with the assumption that the reader:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;has basic knowledge of React and Javascript&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;is familiar with CSS, TailwindCSS, or any other CSS library.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is GSAP?
&lt;/h2&gt;

&lt;p&gt;GSAP is a powerful JavaScript library that helps you create smooth animations and transitions in your web projects. In our example, we'll use GSAP to make objects on the screen follow your mouse cursor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up the Project
&lt;/h2&gt;

&lt;p&gt;Before we dive into the code, make sure you have Node.js and npm (Node Package Manager) installed on your computer. If not, you can download and install them from the &lt;a href="https://nodejs.org/en" rel="noopener noreferrer"&gt;official website&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, let's set up a new React project. Open your terminal and run the following commands:&lt;/p&gt;

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

npx create-react-app mouse-hover-effect
cd mouse-hover-effect
npm install gsap


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

&lt;/div&gt;

&lt;p&gt;We're creating a new React application called "mouse-hover-effect" and installing the GSAP library. Once that's done, you can open your project folder with a code editor.&lt;/p&gt;

&lt;p&gt;If you intend to use Tailwind CSS for styling, follow this &lt;a href="https://tailwindcss.com/docs/guides/create-react-app" rel="noopener noreferrer"&gt;guide&lt;/a&gt; for installation. Feel free to use vanilla CSS or any other CSS framework or library of your choice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating the App Component
&lt;/h2&gt;

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


const App = () =&amp;gt; {
  return (
    &amp;lt;&amp;gt;
    &amp;lt;div className="min-h-screen bg-black"&amp;gt;
      &amp;lt;div className="ball bg-yellow-500 w-4 h-4 fixed top-0 left-0 rounded-full"&amp;gt;&amp;lt;/div&amp;gt; 
      &amp;lt;div className="ball bg-yellow-500 w-4 h-4 fixed top-0 left-0 rounded-full"&amp;gt;&amp;lt;/div&amp;gt;  
      &amp;lt;div className="ball bg-yellow-500 w-4 h-4 fixed top-0 left-0 rounded-full"&amp;gt;&amp;lt;/div&amp;gt;  
      &amp;lt;div className="ball bg-yellow-500 w-4 h-4 fixed top-0 left-0 rounded-full"&amp;gt;&amp;lt;/div&amp;gt;  
      &amp;lt;div className="ball bg-yellow-500 w-4 h-4 fixed top-0 left-0 rounded-full"&amp;gt;&amp;lt;/div&amp;gt;
      &amp;lt;h2 className="text-center text-4xl font-bold text-blue-900"&amp;gt;Mouse Hover Effect&amp;lt;/h2&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;/&amp;gt;
  );
};
export default App;



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

&lt;/div&gt;

&lt;p&gt;To see the app in action, start your development server with the following command:&lt;/p&gt;

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

npm start



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

&lt;/div&gt;

&lt;p&gt;Open your web browser and go to &lt;code&gt;http://localhost:3000&lt;/code&gt; You should see a black interface with five yellow balls stacked at the top-right of your screen. We also have a text heading that says "Mouse Hover Effect" at the center of the screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's Get Our Balls Moving
&lt;/h2&gt;

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


import React, { useEffect } from "react";
import { gsap } from "gsap";

const App = () =&amp;gt; {
  useEffect(() =&amp;gt; {
    gsap.set(".ball", { xPercent: -50, yPercent: -50 })
    let targets = gsap.utils.toArray(".ball");
    window.addEventListener("mousemove", (e) =&amp;gt; {
      gsap.to(targets, {
        duration: 0.5,
        x: e.clientX,
        y: e.clientY,
        ease: "power1.out",
        overwrite: "auto",
        stagger: 0.02,
      });
    });
  }, 
[]
);

  return (
    &amp;lt;&amp;gt;
    &amp;lt;div className="min-h-screen bg-black"&amp;gt;
    &amp;lt;div className="ball bg-yellow-500 w-4 h-4 fixed top-0 left-0 rounded-full"&amp;gt;&amp;lt;/div&amp;gt; 
      &amp;lt;div className="ball bg-yellow-500 w-4 h-4 fixed top-0 left-0 rounded-full"&amp;gt;&amp;lt;/div&amp;gt;  
      &amp;lt;div className="ball bg-yellow-500 w-4 h-4 fixed top-0 left-0 rounded-full"&amp;gt;&amp;lt;/div&amp;gt;  
      &amp;lt;div className="ball bg-yellow-500 w-4 h-4 fixed top-0 left-0 rounded-full"&amp;gt;&amp;lt;/div&amp;gt;  
      &amp;lt;div className="ball bg-yellow-500 w-4 h-4 fixed top-0 left-0 rounded-full"&amp;gt;&amp;lt;/div&amp;gt;
      &amp;lt;h2 className="text-center text-4xl font-bold text-blue-900"&amp;gt;Mouse Hover Effect&amp;lt;/h2&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;/&amp;gt;
  );
};

export default App;



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

&lt;/div&gt;

&lt;p&gt;&lt;code&gt;.set()&lt;/code&gt; is a GSAP method used to set initial properties for elements selected by the specified selector.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gsap.set(".ball", { xPercent: -50, yPercent: -50 });&lt;/code&gt; centers all HTML elements with the class "ball" both horizontally and vertically within their parent containers by adjusting the &lt;code&gt;xPercent&lt;/code&gt; and &lt;code&gt;yPercent&lt;/code&gt; properties using GSAP. The selection of elements can also be done by using React's &lt;a href="https://www.w3schools.com/react/react_useref.asp" rel="noopener noreferrer"&gt;useRef hook&lt;/a&gt; to access DOM elements.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;xPercent: -50&lt;/code&gt; and &lt;code&gt;YPercent: -50&lt;/code&gt; properties specify the horizontal position and vertical position of the element as a percentage of its width and height, respectively.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gsap.utils.toArray(".ball")&lt;/code&gt; is used to select all HTML elements with the class "ball" and convert them into an array. This can be useful when you want to work with multiple elements that share the same class. The resulting array is assigned to the variable &lt;code&gt;targets&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gsap.to(targets, { ... });&lt;/code&gt; uses GSAP's &lt;code&gt;to&lt;/code&gt; method to animate one or more elements specified by the &lt;code&gt;targets&lt;/code&gt; variable. The animation properties and values are defined within the object passed as the second argument.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;x: e.clientX, y: e.clientYset&lt;/code&gt; the &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; properties of the animation. They are being animated to the current position of the mouse cursor.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ease: "power1.out"&lt;/code&gt; specifies the easing function for the animation. "power1.out" provides smooth acceleration and deceleration.&lt;br&gt;
You can check out &lt;a href="https://greensock.com/docs/v3/Eases" rel="noopener noreferrer"&gt;GreenSock Ease Visualizer&lt;/a&gt; to see and test other easing functions in GSAP&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%2Fmz80vw5zvhxwpugls7bj.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%2Fmz80vw5zvhxwpugls7bj.png" alt="GreenSock Ease Visualizer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;overwrite: "auto"&lt;/code&gt; controls how the animation behaves if multiple animations are triggered before the previous one completes. &lt;code&gt;"Auto"&lt;/code&gt; means that GSAP will automatically handle overlapping animations, ensuring that the latest animation takes precedence.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;stagger: 0.02&lt;/code&gt; introduces a stagger effect, meaning that if you have multiple elements in your &lt;code&gt;targets&lt;/code&gt; array, they will start their animations with a slight delay of 0.02 seconds between each element. This creates a cascading or staggered effect for the animations.&lt;/p&gt;
&lt;h2&gt;
  
  
  Food is Ready
&lt;/h2&gt;

&lt;p&gt;We've just created a simple yet impressive mouse hover effect using React and GSAP. You can poke around, experiment, and give it your spice.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/wonderful-goldwasser-5x3pm6"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;I hope you found this piece insightful and valuable. If you have any questions or thoughts to share, please do so in the comments. Thank you for reading!&lt;/p&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;

</description>
      <category>react</category>
      <category>animation</category>
      <category>webdev</category>
      <category>gsap</category>
    </item>
    <item>
      <title>Connect Wallet to React dApp with ConnectKit</title>
      <dc:creator>Samuel Afolabi</dc:creator>
      <pubDate>Tue, 27 Dec 2022 21:17:27 +0000</pubDate>
      <link>https://dev.to/samuelafolabi/connect-wallet-to-react-dapp-with-connectkit-2i3l</link>
      <guid>https://dev.to/samuelafolabi/connect-wallet-to-react-dapp-with-connectkit-2i3l</guid>
      <description>&lt;p&gt;ConnectKit is a React library for connecting dApps to wallets. As at the time of writing this article, the v1.1.1 edges other competitors with typescript support, custom themes, and language translation. &lt;/p&gt;

&lt;p&gt;This article was written with the assumption that the reader is familiar with css, javascript, react and blockchain rudimentary terms. Experience with &lt;a href="https://chakra-ui.com/" rel="noopener noreferrer"&gt;ChakraUI&lt;/a&gt; is a plus.&lt;/p&gt;

&lt;p&gt;Let's get to business🙂.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create a react app - of course🥴
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app hello-wallet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Install ConnectKit and its peer dependences
&lt;/h2&gt;

&lt;p&gt;Co-dependencies for connection include &lt;em&gt;wagmi&lt;/em&gt; and &lt;em&gt;ethers&lt;/em&gt; , as connectKit uses both behind the scenes&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install connectkit wagmi ethers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Create a client
&lt;/h2&gt;

&lt;p&gt;I would suggest creating a separate js file for client creation to make the code cleaner. Let's name this file connectWeb3.js. &lt;br&gt;
You'll need to generate one of  &lt;a href="https://www.alchemy.com/" rel="noopener noreferrer"&gt;Alchemy&lt;/a&gt; or &lt;a href="https://www.infura.io/" rel="noopener noreferrer"&gt;Infura&lt;/a&gt; endpoint and key. These need to be provided to allow for walletConnect &lt;em&gt;(an open source protocol that helps connect decentralised applications to mobile wallets with QR code scanning or deep linking)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;ConnectKit also allows you to switch between networks seamlessly. You can do this by adding chains from wagmi. I am adding 4 chains here : Eth-mainnet, polygon, optimism and arbitrum.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;connectWeb3.js&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { createClient } from "wagmi";
import { mainnet, polygon, optimism, arbitrum } from "wagmi/chains"; 
import { getDefaultClient } from "connectkit";

export const alchemyId = process.env.ALCHEMY_ID;
const chains = [mainnet, polygon, optimism, arbitrum];

export const client = createClient(
  getDefaultClient({
    appName: "hello-wallet",
    alchemyId,
    chains,
  })
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that our client is set up, we move to the next step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap the App
&lt;/h2&gt;

&lt;p&gt;Wrap the app with &lt;em&gt;WagmiConfig&lt;/em&gt; from Wagmi and &lt;em&gt;ConnectKitProvider&lt;/em&gt; from Conneckit. Since this is just a demonstration for this article, only one component - HelloWalletComponent - is included.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;App.js&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { WagmiConfig } from "wagmi";
import { client } from "./connectWeb3";
import { ConnectKitProvider } from "connectkit";

function App() {
  return (
 &amp;lt;WagmiConfig client={client}&amp;gt;
       &amp;lt;ConnectKitProvider&amp;gt;
           &amp;lt;HelloWalletComponent/&amp;gt;
        &amp;lt;/ConnectKitProvider &amp;gt;
&amp;lt;/WagmiConfig&amp;gt;
);
export default App;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Let's go for the button 🎯
&lt;/h2&gt;

&lt;p&gt;You can simply import the connect button and have it displayed like the image below this code block. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;HelloWalletComponent.js&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Box, Flex, Text, VStack } from "@chakra-ui/react";
import { ConnectKitButton } from "connectkit";


function HelloWalletComponent() {
  return (
    &amp;lt;Box&amp;gt;
      &amp;lt;Flex height="80vh" justifyContent="center" 
        alignItems="center"&amp;gt;
        &amp;lt;VStack&amp;gt;
          &amp;lt;Text fontSize={{ base: "18vw", md: "12vw" }} 
            textAlign="center"&amp;gt;
               GM &amp;lt;span&amp;gt; fren &amp;lt;/span&amp;gt;
          &amp;lt;/Text&amp;gt;
           //button here 👇🏽
          &amp;lt;ConnectKitButton /&amp;gt;
          //button here 👆🏽
        &amp;lt;/VStack&amp;gt;
      &amp;lt;/Flex&amp;gt;
    &amp;lt;/Box&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2F1t0j4lti204wv8mj8zuf.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%2F1t0j4lti204wv8mj8zuf.png" alt="connectKit button with no customization"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Usually you would want the button matched up with your app theme. How then does one go about this? Let's have a walk through in the following sections. &lt;/p&gt;

&lt;h2&gt;
  
  
  Customization
&lt;/h2&gt;

&lt;p&gt;There are quite a number of ways to do this. For brevity purpose, I'll discuss this just the way I think it's best. You can check out the &lt;a href="https://docs.family.co/connectkit/theming#theme-variables-variables" rel="noopener noreferrer"&gt;Docs&lt;/a&gt; if you want to satisfy your curiosity.&lt;/p&gt;

&lt;p&gt;ConnectKit provides a custom component - &lt;em&gt;ConnectKitButton.Custom&lt;/em&gt; - that has render props for necessary wallet connection states. You can take advantage of this to build components like buttons, connection status signals, ens name / wallet address display or in fact make dynamic stylings.&lt;/p&gt;

&lt;p&gt;The styling in the code block below takes the "sx" - ChakraUI's way of writing the style prop. That's why the styling is written as an object with cssv attributes in camel cases.&lt;br&gt;&lt;br&gt;
You can simply pass in the stylings with classNames, utility classes, or any form the react framework you use allows.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;HelloWalletComponent.js&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Box, Button, Flex, Text, VStack } from "@chakra-ui/react";

import { ConnectKitButton } from "connectkit";

function HelloWalletComponent() {

  const buttonStyle = {
    color: "black",
    fontSize: "2rem",
    border: "solid 2px black",
    padding: "2rem",
    fontFamily: "Bebas Neue",
    background: "transparent",
    fontWeight: "500",
    _hover: {
      border: "solid 1px black",
    },
  };

  return (
    &amp;lt;Box&amp;gt;
      &amp;lt;Flex height="80vh" justifyContent="center" alignItems="center"&amp;gt;
        &amp;lt;VStack&amp;gt;
          &amp;lt;Text fontSize={{ base: "18vw", md: "12vw" }} textAlign="center"&amp;gt;
               GM &amp;lt;span&amp;gt; fren &amp;lt;/span&amp;gt;
          &amp;lt;/Text&amp;gt;
           //button here 👇🏽
           &amp;lt;ConnectKitButton.Custom&amp;gt;
            {({
              isConnected,
              isConnecting,
              show,
              hide,
              address,
              truncatedAddress,
              ensName,
            }) =&amp;gt; {
              return (
                &amp;lt;Button onClick={show} sx={buttonStyle}&amp;gt;
                  {isConnected ? truncatedAddress : "Connect wallet og"}
                &amp;lt;/Button&amp;gt;
              );
            }}
          &amp;lt;/ConnectKitButton.Custom&amp;gt;
          //button here 👆🏽
        &amp;lt;/VStack&amp;gt;
      &amp;lt;/Flex&amp;gt;
    &amp;lt;/Box&amp;gt;
  );
}

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

&lt;/div&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%2Ffzrmhygriledi7yx982g.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%2Ffzrmhygriledi7yx982g.png" alt="button customization with connectKit"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is important to mention that Connectkit provides you with custom themes, and ability to customize the theme and mode. You can override the styles of a theme by passing providing a customTheme prop to the &lt;em&gt;ConnectKitProvider&lt;/em&gt; . You can modify styling variables for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;the whole ConnectKit System - just as the font-family, border-radius, and background are modified in the example below&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Connect Wallet Button&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Primary Buttons&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Secondary Buttons&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tertiary Buttons&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Modal&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Texts and Miscellaneous&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is also an &lt;em&gt;options&lt;/em&gt; prop that allows for more customizations. It is recommended that the &lt;em&gt;embedGoogleFonts&lt;/em&gt; is set to true to ensure fonts appear correctly. Other options take mostly booleans and strings.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;App.js&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { WagmiConfig } from "wagmi";
import { client } from "./connectWeb3";
import { ConnectKitProvider } from "connectkit";

function App() {
  return (
 &amp;lt;WagmiConfig client={client}&amp;gt;
       &amp;lt;ConnectKitProvider
          mode="light"
          customTheme={{
            "--ck-font-family": "Bebas Neue",
            "--ck-border-radius": "0px",
            "--ck-background": "#F0FFF3",
          }}
         options={{
            embedGoogleFonts: true,
            disclaimer: &amp;lt;&amp;gt; connect your wallet fren. Welcome to 
             Web3 &amp;lt;/&amp;gt;,
            showBalance: true,
            hideQuestionMarkCTA: true,
          }}
&amp;gt;
           &amp;lt;HelloWalletComponent/&amp;gt;
        &amp;lt;/ConnectKitProvider &amp;gt;
&amp;lt;/WagmiConfig&amp;gt;
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2F4a92zdf0zlep7jsfcps5.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%2F4a92zdf0zlep7jsfcps5.png" alt="wallet connection modal"&gt;&lt;/a&gt;&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%2Fzfi3ybegz6lxup52nths.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%2Fzfi3ybegz6lxup52nths.png" alt="truncated address"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All the chains imported from &lt;em&gt;wagmi&lt;/em&gt; are rendered as shown in the image below in the connectWeb3.js file&lt;br&gt;
&lt;code&gt;const chains = [mainnet, polygon, optimism, arbitrum];&lt;br&gt;
&lt;/code&gt;&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%2Fh6rdanp56qb52kl4gvyo.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%2Fh6rdanp56qb52kl4gvyo.png" alt=" wagmi and connectkit chains"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's all I have got in my tiny head for now fren. I would appreciate your suggestions, and other ways you have done this implementation. &lt;/p&gt;

&lt;p&gt;Gm and Happy Hacking!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
