<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>0xModene</title>
        <link>https://paragraph.com/@modene</link>
        <description>undefined</description>
        <lastBuildDate>Sun, 05 Apr 2026 06:25:24 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <image>
            <title>0xModene</title>
            <url>https://storage.googleapis.com/papyrus_images/84053b75f57d08b152231922d2ea7c617ab76c4365bde3efd1441c9e776f009e.png</url>
            <link>https://paragraph.com/@modene</link>
        </image>
        <copyright>All rights reserved</copyright>
        <item>
            <title><![CDATA[Creating a Next app with RainbowKit and Tailwind]]></title>
            <link>https://paragraph.com/@modene/creating-a-next-app-with-rainbowkit-and-tailwind</link>
            <guid>6Xa2xp8mfuutg3QKcQB1</guid>
            <pubDate>Wed, 09 Nov 2022 13:51:49 GMT</pubDate>
            <description><![CDATA[This is an opinionated, simple guide to quickly create a dapp using Next.js, RainbowKit, and TailwindSubscribeNext.js AppIn the development directory of your choice, run:npx create-next-app@latest --ts Simple as that! The tool will run you through a wizard to set up some basic configuration for your project and scaffold a Next app with Typescript support and built-in types, requiring no further configuration.Tailwind.cssThe next step is installing and setting up Tailwind.cssnpm install -D tai...]]></description>
            <content:encoded><![CDATA[<p>This is an opinionated, simple guide to quickly create a dapp using <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://nextjs.org/">Next.js</a>, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.rainbowkit.com/docs/introduction">RainbowKit</a>, and <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://tailwindcss.com/">Tailwind</a></p><div data-type="subscribeButton" class="center-contents"><a class="email-subscribe-button" href="null">Subscribe</a></div><h2 id="h-nextjs-app" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Next.js App</h2><p>In the development directory of your choice, run:</p><pre data-type="codeBlock" text="npx create-next-app@latest --ts
"><code>npx create<span class="hljs-operator">-</span>next<span class="hljs-operator">-</span>app@latest <span class="hljs-operator">-</span><span class="hljs-operator">-</span>ts
</code></pre><p>Simple as that! The tool will run you through a wizard to set up some basic configuration for your project and scaffold a Next app with Typescript support and built-in types, requiring no further configuration.</p><h2 id="h-tailwindcss" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Tailwind.css</h2><p>The next step is installing and setting up <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://tailwindcss.com/">Tailwind.css</a></p><pre data-type="codeBlock" text="npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
"><code>npm install <span class="hljs-operator">-</span>D tailwindcss postcss autoprefixer
npx tailwindcss init <span class="hljs-operator">-</span>p
</code></pre><p>This will install Tailwind and some required dependencies, as well as generate both your <code>tailwind.config.js</code> and <code>postcss.config.js</code> files, which are empty by default. You’ll then want to add the following to <code>tailwind.config.js</code>:</p><pre data-type="codeBlock" text="/** @type {import(&apos;tailwindcss&apos;).Config} */
module.exports = {
  content: [
    &quot;./app/**/*.{js,ts,jsx,tsx}&quot;,
    &quot;./pages/**/*.{js,ts,jsx,tsx}&quot;,
    &quot;./components/**/*.{js,ts,jsx,tsx}&quot;,
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}
"><code><span class="hljs-comment">/** @type {import('tailwindcss').Config} */</span>
module<span class="hljs-selector-class">.exports</span> = {
  <span class="hljs-attribute">content</span>: [
    <span class="hljs-string">"./app/**/*.{js,ts,jsx,tsx}"</span>,
    <span class="hljs-string">"./pages/**/*.{js,ts,jsx,tsx}"</span>,
    <span class="hljs-string">"./components/**/*.{js,ts,jsx,tsx}"</span>,
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}
</code></pre><p>Once this is complete, the app is setup to use Tailwind! Refer to the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://tailwindcss.com/">Tailwind docs</a> for more info on using Tailwind and how you can change its configs.</p><h2 id="h-rainbowkit" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">RainbowKit</h2><p>Now it’s time to set up RainbowKit. The Rainbow team has a CLI tool that actually does this and the Next app steps for you, but we’re doing this the ‘hard’ way so you can get a better feel for how things work.</p><p>Install RainbowKit and it’s required dependencies:</p><pre data-type="codeBlock" text="npm install @rainbow-me/rainbowkit wagmi ethers
"><code>npm install @rainbow<span class="hljs-operator">-</span>me<span class="hljs-operator">/</span>rainbowkit wagmi ethers
</code></pre><p>Now, go to your <code>pages/_app.tsx</code> file and replace it with the following:</p><pre data-type="codeBlock" text="import &quot;../styles/globals.css&quot;;
import type {AppProps} from &quot;next/app&quot;;
import &quot;@rainbow-me/rainbowkit/styles.css&quot;;
import {getDefaultWallets, RainbowKitProvider} from &quot;@rainbow-me/rainbowkit&quot;;
import {chain, configureChains, createClient, WagmiConfig} from &quot;wagmi&quot;;
import {alchemyProvider} from &quot;wagmi/providers/alchemy&quot;;
import {publicProvider} from &quot;wagmi/providers/public&quot;;

const {chains, provider} = configureChains(
  [chain.mainnet, chain.polygon, chain.optimism, chain.arbitrum],
  [alchemyProvider({apiKey: process.env.ALCHEMY_ID}), publicProvider()]
);
const {connectors} = getDefaultWallets({
  appName: &quot;My Dapp&quot;,
  chains,
});
const wagmiClient = createClient({
  autoConnect: true,
  connectors,
  provider,
});

export default function App({Component, pageProps}: AppProps) {
  return (
    &lt;WagmiConfig client={wagmiClient}&gt;
      &lt;RainbowKitProvider chains={chains}&gt;
        &lt;Component {...pageProps} /&gt;
      &lt;/RainbowKitProvider&gt;
    &lt;/WagmiConfig&gt;
  );
}
"><code><span class="hljs-keyword">import</span> <span class="hljs-string">"../styles/globals.css"</span>;
<span class="hljs-keyword">import</span> <span class="hljs-title"><span class="hljs-keyword">type</span></span> {<span class="hljs-title">AppProps</span>} <span class="hljs-title"><span class="hljs-keyword">from</span></span> <span class="hljs-string">"next/app"</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">"@rainbow-me/rainbowkit/styles.css"</span>;
<span class="hljs-keyword">import</span> {<span class="hljs-title">getDefaultWallets</span>, <span class="hljs-title">RainbowKitProvider</span>} <span class="hljs-title"><span class="hljs-keyword">from</span></span> <span class="hljs-string">"@rainbow-me/rainbowkit"</span>;
<span class="hljs-keyword">import</span> {<span class="hljs-title">chain</span>, <span class="hljs-title">configureChains</span>, <span class="hljs-title">createClient</span>, <span class="hljs-title">WagmiConfig</span>} <span class="hljs-title"><span class="hljs-keyword">from</span></span> <span class="hljs-string">"wagmi"</span>;
<span class="hljs-keyword">import</span> {<span class="hljs-title">alchemyProvider</span>} <span class="hljs-title"><span class="hljs-keyword">from</span></span> <span class="hljs-string">"wagmi/providers/alchemy"</span>;
<span class="hljs-keyword">import</span> {<span class="hljs-title">publicProvider</span>} <span class="hljs-title"><span class="hljs-keyword">from</span></span> <span class="hljs-string">"wagmi/providers/public"</span>;

const {chains, provider} <span class="hljs-operator">=</span> configureChains(
  [chain.mainnet, chain.polygon, chain.optimism, chain.arbitrum],
  [alchemyProvider({apiKey: process.env.ALCHEMY_ID}), publicProvider()]
);
const {connectors} <span class="hljs-operator">=</span> getDefaultWallets({
  appName: <span class="hljs-string">"My Dapp"</span>,
  chains,
});
const wagmiClient <span class="hljs-operator">=</span> createClient({
  autoConnect: <span class="hljs-literal">true</span>,
  connectors,
  provider,
});

export default <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">App</span>(<span class="hljs-params">{Component, pageProps}: AppProps</span>) </span>{
  <span class="hljs-keyword">return</span> (
    <span class="hljs-operator">&#x3C;</span>WagmiConfig client<span class="hljs-operator">=</span>{wagmiClient}<span class="hljs-operator">></span>
      <span class="hljs-operator">&#x3C;</span>RainbowKitProvider chains<span class="hljs-operator">=</span>{chains}<span class="hljs-operator">></span>
        <span class="hljs-operator">&#x3C;</span>Component {...pageProps} <span class="hljs-operator">/</span><span class="hljs-operator">></span>
      <span class="hljs-operator">&#x3C;</span><span class="hljs-operator">/</span>RainbowKitProvider<span class="hljs-operator">></span>
    <span class="hljs-operator">&#x3C;</span><span class="hljs-operator">/</span>WagmiConfig<span class="hljs-operator">></span>
  );
}
</code></pre><p>What we’re doing here is configuring the clients and context providers required for <code>wagmi</code>, <code>ethers</code>, and <code>RainbowKit</code>. The <code>connectors</code> and <code>wagmiClient</code> variables can be edited and configured how you need them to be, but the default is good here. More information on those can be found <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.rainbowkit.com/docs">here</a>.</p><p>Now that RainbowKit is installed and set up, we need to add the connect button so that we can actually connect to the chain from a wallet. In your <code>pages/index.tsx</code> file, import the <code>ConnectButton</code> component and insert it into the view as shown below:</p><pre data-type="codeBlock" text="{...}
import styles from &quot;../styles/Home.module.css&quot;;
import {ConnectButton} from &quot;@rainbow-me/rainbowkit&quot;;

export default function Home() {
  return (
    &lt;div className={styles.container}&gt;
      &lt;Head&gt;
        &lt;title&gt;Create Next App&lt;/title&gt;
        &lt;meta name=&quot;description&quot; content=&quot;Generated by create next app&quot; /&gt;
        &lt;link rel=&quot;icon&quot; href=&quot;/favicon.ico&quot; /&gt;
      &lt;/Head&gt;

      &lt;main className={styles.main}&gt;
        &lt;h1 className={styles.title}&gt;
          Welcome to &lt;a href=&quot;https://nextjs.org&quot;&gt;Next.js!&lt;/a&gt;
        &lt;/h1&gt;
        &lt;ConnectButton /&gt;

{...}
"><code>{...}
<span class="hljs-keyword">import</span> <span class="hljs-title">styles</span> <span class="hljs-title"><span class="hljs-keyword">from</span></span> <span class="hljs-string">"../styles/Home.module.css"</span>;
<span class="hljs-keyword">import</span> {<span class="hljs-title">ConnectButton</span>} <span class="hljs-title"><span class="hljs-keyword">from</span></span> <span class="hljs-string">"@rainbow-me/rainbowkit"</span>;

export default <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Home</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">return</span> (
    <span class="hljs-operator">&#x3C;</span>div className<span class="hljs-operator">=</span>{styles.container}<span class="hljs-operator">></span>
      <span class="hljs-operator">&#x3C;</span>Head<span class="hljs-operator">></span>
        <span class="hljs-operator">&#x3C;</span>title<span class="hljs-operator">></span>Create Next App<span class="hljs-operator">&#x3C;</span><span class="hljs-operator">/</span>title<span class="hljs-operator">></span>
        <span class="hljs-operator">&#x3C;</span>meta name<span class="hljs-operator">=</span><span class="hljs-string">"description"</span> content<span class="hljs-operator">=</span><span class="hljs-string">"Generated by create next app"</span> <span class="hljs-operator">/</span><span class="hljs-operator">></span>
        <span class="hljs-operator">&#x3C;</span>link rel<span class="hljs-operator">=</span><span class="hljs-string">"icon"</span> href<span class="hljs-operator">=</span><span class="hljs-string">"/favicon.ico"</span> <span class="hljs-operator">/</span><span class="hljs-operator">></span>
      <span class="hljs-operator">&#x3C;</span><span class="hljs-operator">/</span>Head<span class="hljs-operator">></span>

      <span class="hljs-operator">&#x3C;</span>main className<span class="hljs-operator">=</span>{styles.main}<span class="hljs-operator">></span>
        <span class="hljs-operator">&#x3C;</span>h1 className<span class="hljs-operator">=</span>{styles.title}<span class="hljs-operator">></span>
          Welcome to <span class="hljs-operator">&#x3C;</span>a href<span class="hljs-operator">=</span><span class="hljs-string">"https://nextjs.org"</span><span class="hljs-operator">></span>Next.js!<span class="hljs-operator">&#x3C;</span><span class="hljs-operator">/</span>a<span class="hljs-operator">></span>
        <span class="hljs-operator">&#x3C;</span><span class="hljs-operator">/</span>h1<span class="hljs-operator">></span>
        <span class="hljs-operator">&#x3C;</span>ConnectButton <span class="hljs-operator">/</span><span class="hljs-operator">></span>

{...}
</code></pre><p>You can put the component anywhere, this is only an example. Once you’ve done this, run <code>npm run dev</code> to serve up the site. You should notice a button reading ‘Connect Wallet’ that, when clicked, will prompt you to connect to an assortment of crypto wallets.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/36b4ee764716ecc9a14bac10eda98a81db48e24d4f8aac2521b724a20c7d10ef.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>That’s it! You’re now all set to build your dapp.</p><h3 id="h-references" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">References</h3><ul><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/0xModene/template-next-rainbowkit-tailwind">Github for this code</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://nextjs.org/">Next.js docs</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://tailwindcss.com/">Tailwind docs</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.rainbowkit.com/docs/introduction">RainbowKit docs</a></p></li></ul>]]></content:encoded>
            <author>modene@newsletter.paragraph.com (0xModene)</author>
        </item>
    </channel>
</rss>