<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by MEGHA K L on Medium]]></title>
        <description><![CDATA[Stories by MEGHA K L on Medium]]></description>
        <link>https://medium.com/@meghalald31?source=rss-e31c53e990f3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*oAr5JR6QAt16Msc5uMKSbA.jpeg</url>
            <title>Stories by MEGHA K L on Medium</title>
            <link>https://medium.com/@meghalald31?source=rss-e31c53e990f3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 16:50:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@meghalald31/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to add Tailwindcss in React]]></title>
            <link>https://medium.com/@meghalald31/how-to-add-tailwindcss-in-react-70c1535f5c23?source=rss-e31c53e990f3------2</link>
            <guid isPermaLink="false">https://medium.com/p/70c1535f5c23</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[tailwind-css]]></category>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[MEGHA K L]]></dc:creator>
            <pubDate>Sat, 20 Jul 2024 08:49:59 GMT</pubDate>
            <atom:updated>2025-01-27T07:49:26.046Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RBIGLez9lDm3bE0Ybqth5g.jpeg" /></figure><p>As a beginner, I had trouble importing Tailwind CSS into my React applications. With the help of chatGPT and the Tailwind CSS documentation I successfully integrated ;)</p><p>The steps are listed here in hopes that they would be helpful to someone else, as they were helpful to me:</p><p><strong>Step 1: </strong>Set up your react project by using anyone of the built tools</p><ul><li>Vite (I personally prefer using Vite)</li></ul><pre>npm create vite@latest </pre><ul><li>Create React App</li></ul><pre>npx create-react-app my-app<br>cd my-app</pre><p><strong>Step 2:</strong> Install Tailwind CSS and its dependencies</p><pre>npm install -D tailwindcss postcss autoprefixer</pre><p><strong>Step 3:</strong> Initialize Tailwind CSS and PostCSS</p><pre>npx tailwindcss init -p</pre><p><strong>Step 4:</strong> Configure your template paths in tailwind.config.js</p><pre>module.exports = {<br> content: [<br> “./src/**/*.{js,jsx,ts,tsx}”,<br> ],<br> theme: {<br> extend: {},<br> },<br> plugins: [],<br>}</pre><p><strong>Step 5:</strong> Add Tailwind directives to your index.css</p><pre>@import ‘tailwindcss/base’;<br>@import ‘tailwindcss/components’;<br>@import ‘tailwindcss/utilities’;</pre><p>(make sure to add these on the top) and after that Ensure that index.css is imported in your src/main.jsx:</p><p><strong>Step 6:</strong> Start your development server</p><p>If you’re using Vite then :</p><pre>npm run dev </pre><p>If you’re using create-react-app then :</p><pre>npm start</pre><p><strong>Step 7:</strong> Use Tailwind CSS in your components</p><pre>function App() {<br> return (<br> &lt;div className=”flex items-center justify-center h-screen”&gt;<br> &lt;h1 className=”text-3xl font-bold text-blue-500&quot;&gt;<br> Hello, Tailwind CSS!<br> &lt;/h1&gt;<br> &lt;/div&gt;<br> );<br>}<br>export default App;</pre><p><strong>NOTE:</strong> There has been a change due to a package being moved. I suggest checking the Getting Started section of the Tailwind CSS documentation.</p><ul><li>They have provided multiple ways to install tailwind CSS via vite , framework etc. that works</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70c1535f5c23" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>