<?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 Daniel Codrea on Medium]]></title>
        <description><![CDATA[Stories by Daniel Codrea on Medium]]></description>
        <link>https://medium.com/@daniel.codrea?source=rss-8475848027cd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9lOUw8xuLVBzt3D2-YxCXg.jpeg</url>
            <title>Stories by Daniel Codrea on Medium</title>
            <link>https://medium.com/@daniel.codrea?source=rss-8475848027cd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 18:29:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@daniel.codrea/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[Setting up a PrimeNG v20 and TailwindCSS v4 project]]></title>
            <link>https://medium.com/@daniel.codrea/setting-up-a-primeng-v19-and-tailwindcss-v4-project-f1b550c8e2d0?source=rss-8475848027cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1b550c8e2d0</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[setup-guide]]></category>
            <category><![CDATA[tailwind-css]]></category>
            <category><![CDATA[primeng]]></category>
            <dc:creator><![CDATA[Daniel Codrea]]></dc:creator>
            <pubDate>Tue, 11 Feb 2025 13:26:57 GMT</pubDate>
            <atom:updated>2025-10-03T06:02:31.964Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MqU9b6z9zG0yvPv_ftIMpw.jpeg" /><figcaption>Image by <a href="https://pixabay.com/users/stocksnap-894430/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2588957">StockSnap</a> from <a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2588957">Pixabay</a></figcaption></figure><p>UPDATE: The story is updated to support <strong>Angular v20</strong>.</p><p>The following is a simple step-by-step guide on how to create a basic <strong>Angular v20</strong> project that uses <strong>SCSS</strong> as a stylesheet format, and <strong>PrimeNG v19</strong> with <strong>TailwindCSS v4</strong>.</p><p>The current documentation of <a href="https://primeng.org/tailwind">PrimeNG</a> is not complete, and the provided examples don’t specify the exact version number for TailwindCSS, which creates some confusion. This is because TailwindCSS also changed its framework integration guides from version 3 to version 4.</p><h3>Step 1: Generate a new Angular application</h3><p>Make sure you are using the latest Angular CLI by running the command:</p><pre>ng version</pre><p>This should generate a screen similar to:</p><figure><img alt="Check your installed Angular CLI version" src="https://cdn-images-1.medium.com/max/466/1*ow8Ipb3PsnamyzaZV-iucg.png" /></figure><p>After this step, you can run the generate new project command like:</p><pre>ng new sample-project</pre><p>You can use any project name you desire instead of the `<em>sample-projects</em>` name from the command above.</p><p>The command will create a new project and will ask a couple of questions along the way:</p><p>1. Which stylesheet format would you like to use? Answer <strong>SCSS</strong></p><p>2. Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)? Answer <strong>N </strong>(not in the scope of this article)</p><h3>Step 2: Install PrimeNG and prime-icons</h3><p>Once the application is installed, you can continue with installing the <strong>primeNG</strong> and <strong>primeicons</strong> dependencies by running the following commands:</p><pre>npm install primeng @primeng/themes<br>npm install primeicons</pre><p>Of course, the primeicons library is purely optional and can be omitted.</p><p>For your application to properly use primeng and prime-icons, you have to adjust your Angular app configuration by editing the `app.config.ts` file, like:</p><pre>import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZonelessChangeDetection } from &#39;@angular/core&#39;;<br>import { provideRouter } from &#39;@angular/router&#39;;<br><br>import { routes } from &#39;./app.routes&#39;;<br>import { providePrimeNG } from &#39;primeng/config&#39;;<br>import Aura from &#39;@primeng/themes/aura&#39;;<br><br>export const appConfig: ApplicationConfig = {<br>  providers: [<br>    provideBrowserGlobalErrorListeners(),<br>    provideZonelessChangeDetection(),<br>    provideRouter(routes),<br>    providePrimeNG({<br>      theme: {<br>        preset: Aura<br>      }<br>    })<br>  ]<br>};</pre><p>To enable the prime icons, import them into your main stylesheet, <strong>styles.scss</strong> file located inside the <strong>src</strong> folder of your project.</p><pre>@use “primeicons/primeicons.css”;</pre><p>Now your application is ready to use primeNG and its components along with prime icons.</p><p>But to make it look better, you still have to follow the last step.</p><h3>Step 3: Install TailwindCSS</h3><p>To be able to use all the power of Tailwind CSS classes, you have to install the required dependencies by running the following command:</p><pre>npm install tailwindcss @tailwindcss/postcss postcss</pre><p>You also need to create a `.postcssrc.json` file in the root level of your project with the following contents:</p><pre>{<br>  &quot;plugins&quot;: {<br>    &quot;@tailwindcss/postcss&quot;: {}<br>  }<br>}</pre><p>After this, all that is left to do is to enable tailwind. For this, edit your <strong>styles.scss</strong> file like so:</p><pre>@use &quot;primeicons/primeicons.css&quot;;<br>@use &quot;tailwindcss&quot;;<br>@layer tailwind, primeng;</pre><p>And modify your <strong>app.config.ts</strong> file like so:</p><pre>import { ApplicationConfig, provideZoneChangeDetection } from &#39;@angular/core&#39;;<br>import { provideRouter } from &#39;@angular/router&#39;;<br><br>import { routes } from &#39;./app.routes&#39;;<br>import { provideAnimationsAsync } from &#39;@angular/platform-browser/animations/async&#39;;<br>import { providePrimeNG } from &#39;primeng/config&#39;;<br>import Aura from &#39;@primeng/themes/aura&#39;;<br><br>export const appConfig: ApplicationConfig = {<br>  providers: [<br>    provideZoneChangeDetection({ eventCoalescing: true }),<br>    provideRouter(routes),<br>    provideAnimationsAsync(),<br>    providePrimeNG({<br>      theme: {<br>        preset: Aura,<br>        options: {<br>          cssLayer: {<br>            name: &#39;primeng&#39;,<br>            order: &#39;tailwind, primeng&#39;,<br>          },<br>        }<br>      }<br>    })]<br>};</pre><h3>Step 4: Bonus — enable the official Prime TailwindCSS plugin</h3><p>If you want to use the official primeNG tailwindcss plugin <strong>tailwindcss-primeui</strong>, all you have to do is install the dependency like:</p><pre>npm install tailwindcss-primeui</pre><p>And enable the plugin in your styles file like so:</p><pre>@use &quot;primeicons/primeicons.css&quot;;<br>@use &quot;tailwindcss&quot;;<br>@plugin &#39;tailwindcss-primeui&#39;;<br>@layer tailwind, primeng;</pre><p>That’s it! Hope it helps, and happy coding!</p><p>PS: If you encounter any issues with your set-up and you think I could help you out, drop a comment ;)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1b550c8e2d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>