<?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: Tailus</title>
    <description>The latest articles on DEV Community by Tailus (@tailus).</description>
    <link>https://dev.to/tailus</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%2Forganization%2Fprofile_image%2F5800%2F0f01a558-10d8-4b19-b3a5-3b4bd353ec98.png</url>
      <title>DEV Community: Tailus</title>
      <link>https://dev.to/tailus</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tailus"/>
    <language>en</language>
    <item>
      <title>Atom : The most customizable free Astro landing page</title>
      <dc:creator>Méschac Irung</dc:creator>
      <pubDate>Tue, 02 Apr 2024 13:26:07 +0000</pubDate>
      <link>https://dev.to/tailus/atom-the-most-customizable-free-astro-landing-page-2kjp</link>
      <guid>https://dev.to/tailus/atom-the-most-customizable-free-astro-landing-page-2kjp</guid>
      <description>&lt;p&gt;Unleash the potential of your project with a website designed for impact. Showcase your innovative tech tool with intuitive simplicity and elegance. &lt;/p&gt;

&lt;p&gt;Atom is built with meticulous attention to detail as your creation and features a trendy and modern design look and feel to make your website standout.&lt;/p&gt;

&lt;p&gt;Above all, Atom is entirely free, offering a premium template experience at no cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  Screenshots
&lt;/h2&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%2Feoqu8k6vripmwynsh821.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%2Feoqu8k6vripmwynsh821.png" alt="Tailus Atom bento" width="800" height="600"&gt;&lt;/a&gt;&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%2Fcnfqeo510qqm7dt2irjj.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%2Fcnfqeo510qqm7dt2irjj.png" alt="Tailus Atom speed comparaison" width="800" height="600"&gt;&lt;/a&gt;&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%2Fihe4odsggef10z0bb71m.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%2Fihe4odsggef10z0bb71m.png" alt="Tailus Atom content section" width="800" height="600"&gt;&lt;/a&gt;&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%2Fvjt7m7opl3yolmfbqi9q.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%2Fvjt7m7opl3yolmfbqi9q.png" alt="Tailus Atom CTA and footer" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Make it yours with ease
&lt;/h2&gt;

&lt;p&gt;Change colors, shadows, border radius, border and background contrast easily.&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%2F5zpyacijhlecu0uo7c44.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%2F5zpyacijhlecu0uo7c44.png" alt="Tailus Atom custom version" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ready to unlock the potential of Atom ?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ui.tailus.io/templates/atom/" rel="noopener noreferrer"&gt;Get your copy now&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>astro</category>
      <category>tailwindcss</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Ada: The most beautiful free Tailwind Css landing page template</title>
      <dc:creator>Méschac Irung</dc:creator>
      <pubDate>Sat, 09 Mar 2024 09:26:56 +0000</pubDate>
      <link>https://dev.to/tailus/ada-the-most-beautiful-free-tailwind-css-landing-page-template-33e9</link>
      <guid>https://dev.to/tailus/ada-the-most-beautiful-free-tailwind-css-landing-page-template-33e9</guid>
      <description>&lt;p&gt;Ada is a contemporary, free landing page HTML template designed with meticulous attention to detail and a modern aesthetic.&lt;/p&gt;

&lt;p&gt;Ideal for startups, SaaS businesses, and open-source projects, Ada boasts a polished and sophisticated interface that elevates your brand with its clean, modern layout and thoughtful design.&lt;/p&gt;

&lt;p&gt;Experience the difference:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Refined shadows and borders for a touch of elegance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Carefully structured layout and sections for optimal user experience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Versatile design adaptable to diverse projects.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Support Dark Mode
&lt;/h2&gt;

&lt;p&gt;Adapts to your user's system preferences&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%2Fnnygspxjr34nkm1gx014.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%2Fnnygspxjr34nkm1gx014.png" alt="Tailus Ada dark mode" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Make it yours with ease
&lt;/h2&gt;

&lt;p&gt;Change colors, shadows, border radius, border and background contrast easily.&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%2Fz0mi5ttygjeh204hgoyf.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%2Fz0mi5ttygjeh204hgoyf.png" alt="Tailus Ada custom example" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ready to unlock the potential of Ada ?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ui.tailus.io/templates/ada" rel="noopener noreferrer"&gt;Get your copy now&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tailwindcss</category>
      <category>uidesign</category>
      <category>html</category>
    </item>
    <item>
      <title>New accordion component</title>
      <dc:creator>Méschac Irung</dc:creator>
      <pubDate>Thu, 15 Feb 2024 04:59:40 +0000</pubDate>
      <link>https://dev.to/tailus/new-accordion-component-54ah</link>
      <guid>https://dev.to/tailus/new-accordion-component-54ah</guid>
      <description>&lt;p&gt;According to WAI (Web Accessibility Initiative), an accordion is a vertically stacked set of interactive headings that each contain a title, content snippet, or thumbnail representing a section of content. The headings function as controls that enable users to reveal or hide their associated sections of content. Accordions are commonly used to reduce the need to scroll when presenting multiple sections of content on a single page.&lt;/p&gt;

&lt;p&gt;The most common use is to create the frequently asked questions (FAQ) section.&lt;/p&gt;

&lt;p&gt;The Accordion in Tailus UI React has 6 variants, giving you more options as to how you want the accordion to look.&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%2Fgdjs1xvbhhb8ect1dxdt.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%2Fgdjs1xvbhhb8ect1dxdt.png" alt="Tailus UI React Accordion default variant" width="800" height="449"&gt;&lt;/a&gt;&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%2Fv042bnb596hn15vw83z9.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%2Fv042bnb596hn15vw83z9.png" alt="Tailus UI React Accordion outlined variant" width="800" height="449"&gt;&lt;/a&gt;&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%2Fzi0xzx19ijcw30f5k3f8.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%2Fzi0xzx19ijcw30f5k3f8.png" alt="Tailus UI React Accordion elevated variant" width="800" height="449"&gt;&lt;/a&gt;&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%2F2kzz6pr7xqf5wef8j0s7.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%2F2kzz6pr7xqf5wef8j0s7.png" alt="Tailus UI React Accordion soft variant" width="800" height="449"&gt;&lt;/a&gt;&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%2Fi3mc0o8kd235g0ho5859.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%2Fi3mc0o8kd235g0ho5859.png" alt="Tailus UI React Accordion ghost variant" width="800" height="449"&gt;&lt;/a&gt;&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%2Ffnr49qvfiqdfo3rz54qb.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%2Ffnr49qvfiqdfo3rz54qb.png" alt="Tailus UI React Accordion outlined-elevated variant" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Learn more about the Accordion component &lt;a href="https://beta.tailus.io/uikits/radix-ui/accordion/" rel="noopener noreferrer"&gt;Here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>tailwindcss</category>
      <category>uidesign</category>
    </item>
    <item>
      <title>How to create gradient borders with tailwindcss</title>
      <dc:creator>Méschac Irung</dc:creator>
      <pubDate>Mon, 10 Jul 2023 16:08:20 +0000</pubDate>
      <link>https://dev.to/tailus/how-to-create-gradient-borders-with-tailwindcss-4gk2</link>
      <guid>https://dev.to/tailus/how-to-create-gradient-borders-with-tailwindcss-4gk2</guid>
      <description>&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%2F0v6iqr9yx2t535axwpji.jpg" 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%2F0v6iqr9yx2t535axwpji.jpg" alt="tailus gradient borders cover" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Gradient borders are a great way to add visual interest and depth to a website. They can be used to highlight important elements, create a sense of movement, or simply make a website look more stylish.&lt;/p&gt;

&lt;p&gt;Here are few steps to to create gradient borders with tailwindcss.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Create a container
&lt;/h2&gt;

&lt;p&gt;Create a div element, add &lt;code&gt;rounded-3xl&lt;/code&gt; and &lt;code&gt;p-px&lt;/code&gt; utilities to it. Note that you can use an other border radius utility and padding, visually, the padding will be seen as the size of the border.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"rounded-3xl p-px"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Add a gradient background to the container
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"rounded-3xl p-px bg-gradient-to-b from-gray-200 to-transparent"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your card is over a blury background, you should play with opacity to get a better look. &lt;/p&gt;

&lt;p&gt;Example : &lt;code&gt;from-gray-950/40&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Create an other container inside the parent container
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"rounded-3xl p-px bg-gradient-to-b from-gray-200 to-transparent"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-gray-50 p-10"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Add a custom border radius to the child container
&lt;/h2&gt;

&lt;p&gt;As the parent container has a border radius, you have to add some to the child container to get a perfect rounded border.&lt;/p&gt;

&lt;p&gt;Use this formula to get the border radius of the child container : &lt;/p&gt;

&lt;p&gt;&lt;code&gt;Child container border radius = (parent container border radius) - (parent container padding).&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For example, if the parent container border radius is 10px and the parent container padding is 2px, then the child container border radius would be &lt;code&gt;10px - 2px = 8px&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To calculate, use the css &lt;code&gt;calc&lt;/code&gt; function to get the exact border radius of the child container.&lt;/p&gt;

&lt;p&gt;You can calculate in your head, but using the 'calc' function allows you to obtain the result even when you don't know the padding or border radius of the parent container, as may be the case when using css variables.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;The css rule should look like this : *&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.child-container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;3.5rem&lt;/span&gt; &lt;span class="n"&gt;-&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Arbitrary value
&lt;/h3&gt;

&lt;p&gt;Use an arbitrary value to apply the formula to the tailwind css &lt;code&gt;rounded&lt;/code&gt; utility.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"rounded-3xl p-px bg-gradient-to-b from-gray-200 to-transparent"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-gray-50 p-10 `rounded-[calc(1.5rem-1px)]`"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Add content to your card
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"rounded-3xl p-px bg-gradient-to-b from-gray-200 to-transparent"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-gray-50 p-10 rounded-[calc(1.5rem-1px)]"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"text-gray-700 dark:text-gray-300"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;I absolutely 
love Tailus! The component blocks are beautifully designed and easy to use, which makes creating a great-looking website a breeze.
      &lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

      &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"mt-8 flex gap-4 items-center"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"h-12 w-12 rounded-full"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://pbs.twimg.com/profile_images/1599029039297077249/p0znhFdE_400x400.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;h3&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"text-lg font-medium text-gray-700 dark:text-white"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Oketa Fred&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"text-sm tracking-wide text-gray-600 dark:text-gray-400"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Fullstack Developer&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Congratulations, you've created gradient borders using tailwind css!&lt;/p&gt;

&lt;p&gt;You can use this technique to craft a variety of gradient borders with different colors, gradient styles, and border radii. This approach adds visual interest and depth to your website while maintaining a clean, modern aesthetic.&lt;/p&gt;

&lt;h2&gt;
  
  
  More Tips
&lt;/h2&gt;

&lt;p&gt;Want to take your TailwindCSS skills to the next level? &lt;strong&gt;Tailtips&lt;/strong&gt; is packed with actionable tips and tricks to help you build better, faster, and smarter with TailwindCSS. From creative solutions like gradient borders to advanced techniques and best practices, &lt;strong&gt;Tailtips&lt;/strong&gt; has everything you need to master TailwindCSS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tailtips.dev/" rel="noopener noreferrer"&gt;Discover Tailtips&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tailwindcss</category>
      <category>webdesign</category>
    </item>
    <item>
      <title>How to use Tailwind CSS in a React project.</title>
      <dc:creator>Théo Balick</dc:creator>
      <pubDate>Mon, 03 Jul 2023 15:45:35 +0000</pubDate>
      <link>https://dev.to/tailus/how-to-use-tailwind-css-in-a-react-project-1k9b</link>
      <guid>https://dev.to/tailus/how-to-use-tailwind-css-in-a-react-project-1k9b</guid>
      <description>&lt;h2&gt;
  
  
  1. Introduction
&lt;/h2&gt;

&lt;p&gt;Web design is a hot topic these days, and with the constant evolution of technology and design trends, there are always new techniques, tools and best practices to learn. And among all the methods or means of creating websites that exist, two tools have come to the fore in recent years when it comes to interface creation and design technologies. These are React and tailwind css. It's often difficult at first to get started with or use both in the same project. In this article, I'll explain how to use tailwind css in a react project.&lt;/p&gt;

&lt;p&gt;As a reminder, &lt;a href="https://react.dev" rel="noopener noreferrer"&gt;React&lt;/a&gt; is an open-source JavaScript library developed by Facebook to create user interfaces. And &lt;a href="https://tailwindcss.com" rel="noopener noreferrer"&gt;Tailwind CSS&lt;/a&gt; is a framework that focuses on utility, allowing you to write utility classes directly in your html tags. Handy if you want to save time and be productive!&lt;/p&gt;

&lt;p&gt;Are you ready? Let's go 😊🥰&lt;/p&gt;

&lt;p&gt;Note: You must have &lt;a href="https://nodejs.org/en" rel="noopener noreferrer"&gt;node js&lt;/a&gt; installed on your machine. If you don't, here's the link to download it: &lt;a href="https://nodejs.org/fr/download" rel="noopener noreferrer"&gt;https://nodejs.org/fr/download&lt;/a&gt;&lt;br&gt;
You can check whether node is installed on your computer by typing the following command in the terminal: &lt;code&gt;$ node --version&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%2Frncqr8nrszuux9130hf9.jpg" 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%2Frncqr8nrszuux9130hf9.jpg" alt="console image after executing the node --version command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In my case, for example, node is well installed and I'm using version 18.13.0. The version may be different depending on when you installed node js on your machine.&lt;/p&gt;

&lt;p&gt;Before you start, you need to initialize your react project. If you already have your React project and simply want to add tailwind css to your existing project, you can go straight to the "Adding tailwind css to your project" section.&lt;br&gt;
Here's how to do it: 👇👇👇👇&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Create a react project
&lt;/h2&gt;

&lt;p&gt;The quickest way to do this is with the &lt;code&gt;create-react-app&lt;/code&gt; tool, which already comes with all the necessary configurations for a React project by default.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;#1. Initialize your react project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Go to the folder where you want to initialize your React project, open the command line and type the following command: &lt;code&gt;npx create-react-app my-app&lt;/code&gt; where &lt;code&gt;my-app&lt;/code&gt; is the name of your project. In my case, I'm going to create a project called demo-react-tailwind:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;#2. Move into your project&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd demo-react-tailwind
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;#3. start the development server&lt;/strong&gt;&lt;br&gt;
&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;After typing the &lt;code&gt;npm start&lt;/code&gt; command, the console will display a message telling you that all has gone well, and the development server will be launched on port &lt;code&gt;3000&lt;/code&gt;. The port may be different, but if you get a message similar to mine, it means that all went well.&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%2Fibvrav01uvh562xxsrhl.jpg" 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%2Fibvrav01uvh562xxsrhl.jpg" alt="Image of the console showing that all went well"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you can go to your browser and navigate to the local address displayed in the console. In my case, it's &lt;code&gt;http://localhost:3000&lt;/code&gt;&lt;br&gt;
You should get the following page:&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%2Fxvazl12zfbs51tnezpyj.jpg" 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%2Fxvazl12zfbs51tnezpyj.jpg" alt="Web page image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it, you've just created your React project! Finally 😊🥰🤩&lt;br&gt;
Your structure should look like this:&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%2Ffudkb1waauswlmq4foqs.jpg" 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%2Ffudkb1waauswlmq4foqs.jpg" alt="Project structure"&gt;&lt;/a&gt;&lt;br&gt;
If you'd like to know more about the &lt;code&gt;create-react-app tool&lt;/code&gt;, visit the following link: &lt;a href="https://create-react-app.dev/" rel="noopener noreferrer"&gt;https://create-react-app.dev/&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Add Tailwind css to the project
&lt;/h2&gt;

&lt;p&gt;To add Tailwind to your project, follow the steps below:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;#1. Install Tailwind CSS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In your project, open the terminal and type the following command:&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 -D tailwindcss
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;#2. Generate configuration file&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Tailwind css works with a configuration file. To generate it, type the following command in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx tailwindcss init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check your directory and see if the configuration file has been added.&lt;br&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%2Fed2a95bcs9y1odenhn3i.jpg" 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%2Fed2a95bcs9y1odenhn3i.jpg" alt="Project structure"&gt;&lt;/a&gt;&lt;br&gt;
The file generated must be the same as the one on the image:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/** @type {import('tailwindcss').Config} */&lt;/span&gt;
&lt;span class="kr"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
  &lt;span class="na"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;extend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;#3. Configure your template paths&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In your configuration file, you need to add the paths of all your files that use tailwind styles so that the compiler can recognize the styles. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/** @type {import('tailwindcss').Config} */&lt;/span&gt;
&lt;span class="kr"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./src/**/*.{js,jsx,ts,tsx}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// add this line&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;extend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;#4. Add the Tailwind directives to your CSS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once the last step is done, you need to add the tailwind directives to your css file.&lt;/p&gt;

&lt;p&gt;Note: Directives must be added at the beginning of the file, otherwise it won't work! 😱😱😩😭&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@tailwind&lt;/span&gt; &lt;span class="n"&gt;base&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@tailwind&lt;/span&gt; &lt;span class="n"&gt;components&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@tailwind&lt;/span&gt; &lt;span class="n"&gt;utilities&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c"&gt;/* rest of code */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can use tailwind in your React project. 🥰🎉✨&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;#5. Start using Tailwind in your project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now we'll test it to see if it works. In the App file in the src folder, try changing the color of the paragraph text.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;logo&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./logo.svg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./App.css&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;App&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"App"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;header&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"App-header"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;logo&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"App-logo"&lt;/span&gt; &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"logo"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'text-lime-600'&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* change this line */&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          Edit &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;code&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;src/App.js&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;code&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; and save to reload.
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;
          &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"App-link"&lt;/span&gt;
          &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://reactjs.org"&lt;/span&gt;
          &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"_blank"&lt;/span&gt;
          &lt;span class="na"&gt;rel&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"noopener noreferrer"&lt;/span&gt;
        &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          Learn React
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;header&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And here's the result: the text has changed from white to Lime:&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%2Fhmcwppdgwn1h2ct3ccmh.jpg" 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%2Fhmcwppdgwn1h2ct3ccmh.jpg" alt="App's image file"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you'd like to see the full code, here's the link: &lt;a href="https://github.com/Balick/basic-react-tailwind-boilerplate" rel="noopener noreferrer"&gt;https://github.com/Balick/basic-react-tailwind-boilerplate&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note: If you want to use the full power of Tailwind css, a recommended tool called PostCSS is recommended.&lt;br&gt;
Unfortunately, Create React App does not support custom PostCSS configurations and is incompatible with many important tools in the ecosystem. A solution to this problem would be to use &lt;a href="https://vitejs.dev/" rel="noopener noreferrer"&gt;Vite&lt;/a&gt;, &lt;a href="https://parceljs.org/" rel="noopener noreferrer"&gt;Parcel&lt;/a&gt; or &lt;a href="https://nextjs.org/" rel="noopener noreferrer"&gt;Next.js&lt;/a&gt;, for example. They offer a more flexible development experience, giving you more control over how &lt;a href="https://tailwindcss.com/" rel="noopener noreferrer"&gt;Tailwind&lt;/a&gt; and &lt;a href="https://postcss.org/" rel="noopener noreferrer"&gt;PostCSS&lt;/a&gt; are configured.&lt;/p&gt;

&lt;p&gt;We'll talk about it in a future article. We'll talk about it in a future article 😊😊🤗🤗&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>frontend</category>
      <category>react</category>
      <category>tailwindcss</category>
    </item>
    <item>
      <title>How to create a text gradient with tailwindcss</title>
      <dc:creator>Méschac Irung</dc:creator>
      <pubDate>Wed, 04 Jan 2023 10:10:06 +0000</pubDate>
      <link>https://dev.to/tailus/how-to-create-a-text-gradient-with-tailwindcss-4kng</link>
      <guid>https://dev.to/tailus/how-to-create-a-text-gradient-with-tailwindcss-4kng</guid>
      <description>&lt;p&gt;Text gradients can be a useful and visually appealing element of modern UI design, as they can add depth and interest to text and help it stand out on the page. However, it's important to use them sparingly and in a way that complements the overall design of your interface. Overuse of text gradients or using them in a way that is hard to read or not harmonious with the rest of the design can negatively impact the user experience.&lt;/p&gt;

&lt;p&gt;In general, it's a good idea to consider the readability and legibility of your text when using gradients or other decorative effects. If the text is difficult to read or understand, it will not matter how visually appealing the gradient is.&lt;/p&gt;

&lt;p&gt;Overall, text gradients can be a useful tool in modern UI design when used judiciously and in a way that enhances the user experience.&lt;/p&gt;

&lt;p&gt;In this article, we'll cover how to create a gradient title using Tailwind CSS utilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  First create a &lt;code&gt;h1&lt;/code&gt; tag and give it a content
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;Gradient title&amp;lt;/h1&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After creating a title, let's add some utilities to change our &lt;code&gt;h1&lt;/code&gt; size and weight :&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;h1 class="text-5xl font-bold"&amp;gt;Gradient title&amp;lt;/h1&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Add &lt;code&gt;bg-clip-text&lt;/code&gt; utility
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;bg-clip-text&lt;/code&gt; utility refers to the background-clip property in CSS, it determines the area within which the background color or image of an element is applied. It is used to clip the background image or color of an element and needs the content &lt;code&gt;text&lt;/code&gt; to paint the background to our title or any other text.&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;h1 class="text-5xl font-bold bg-clip-text"&amp;gt;Gradient title&amp;lt;/h1&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, add &lt;code&gt;text-transparent&lt;/code&gt; so that only the background will be applied as text color.&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;h1 class="text-5xl font-bold bg-clip-text text-transparent"&amp;gt;Gradient title&amp;lt;/h1&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Add gradient
&lt;/h2&gt;

&lt;p&gt;Your result should be blank right now as we added &lt;code&gt;text-transparent&lt;/code&gt; class, Now we need to add gradient background utilities to our title to see our gradient applied as text color.&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;h1 class="text-5xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-blue-600 to-purple-500"&amp;gt;Gradient title&amp;lt;/h1&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now our title should look like :&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%2Fv3dbbyzt11sgvzg7tkw3.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%2Fv3dbbyzt11sgvzg7tkw3.png" alt="tailus text gradient" width="800" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can add your brand's colors to make it fit with the rest of your UI elements.&lt;/p&gt;

&lt;h2&gt;
  
  
  More Tips
&lt;/h2&gt;

&lt;p&gt;Want to take your TailwindCSS skills to the next level? &lt;strong&gt;Tailtips&lt;/strong&gt; is packed with actionable tips and tricks to help you build better, faster, and smarter with TailwindCSS. From creative solutions like gradient borders to advanced techniques and best practices, &lt;strong&gt;Tailtips&lt;/strong&gt; has everything you need to master TailwindCSS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tailtips.dev/" rel="noopener noreferrer"&gt;Discover Tailtips&lt;/a&gt;&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>contentwriting</category>
    </item>
    <item>
      <title>Modern UI ressources built on top of Tailwindcss</title>
      <dc:creator>Méschac Irung</dc:creator>
      <pubDate>Sun, 04 Dec 2022 16:22:46 +0000</pubDate>
      <link>https://dev.to/tailus/modern-ui-tailwindcss-ressources-423m</link>
      <guid>https://dev.to/tailus/modern-ui-tailwindcss-ressources-423m</guid>
      <description>&lt;p&gt;Yesterday we released Tailus v2, and it's a set of Easy to customize UI Blocks, VS Code Snippets, and complete and modern Templates that are easy to customize and support light and dark mode, built on top of tailwindcss. &lt;/p&gt;

&lt;p&gt;A few developers have tested these resources and given us great feedback (which you can find on our homepage). That's why I wanted to share this with you. &lt;/p&gt;

&lt;h2&gt;
  
  
  50+ Blocks
&lt;/h2&gt;

&lt;p&gt;As an existing ressource, we brought major changes to our blocks : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Complete redesign to make them look modern and fit with others.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Support for dark and light mode&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2Fsndlvs86z36xp3y7t813.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%2Fsndlvs86z36xp3y7t813.png" alt="tailus blocks" width="800" height="478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  VS Code Snippets
&lt;/h2&gt;

&lt;p&gt;To make your life even easier, we built a VS Code extension that allows you to use some of our components in your html file without copying them from the browser. &lt;/p&gt;

&lt;p&gt;After installing the extension, all that you have to do is to type in your html :&lt;code&gt;tailus-&lt;/code&gt;"name of component", ex : &lt;code&gt;tailus-card&lt;/code&gt; and see a list of modern cards snippets that you can use.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=TailusUI.tailus-snippets" rel="noopener noreferrer"&gt;Install now&lt;/a&gt;&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%2Fq6k1ui7m9pezr2pw241m.jpg" 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%2Fq6k1ui7m9pezr2pw241m.jpg" alt="tailus snippets extension" width="800" height="617"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Modern templates
&lt;/h2&gt;

&lt;p&gt;That's not all as we have also designed two modern templates, one of which is complete with 13 pages (light and dark mode) to allow you to create an out of the box website for an innovative Sass or business.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some screenshots&lt;/strong&gt; :&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%2Fpr8211tat1y1xsj5djlh.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%2Fpr8211tat1y1xsj5djlh.png" alt="tailus ampire solution hero section" width="800" height="527"&gt;&lt;/a&gt;&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%2Farvwhokuccf6r0w8immz.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%2Farvwhokuccf6r0w8immz.png" alt="tailus ampire mission section" width="800" height="527"&gt;&lt;/a&gt;&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%2F37b9my685x3kpf4hck4j.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%2F37b9my685x3kpf4hck4j.png" alt="tailus ampire blog" width="800" height="527"&gt;&lt;/a&gt;&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%2Fazzwr0zec5anwm1cia32.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%2Fazzwr0zec5anwm1cia32.png" alt="tailus ampire customers" width="800" height="527"&gt;&lt;/a&gt;&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%2F59tjhm381kuqpg139zum.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%2F59tjhm381kuqpg139zum.png" alt="tailus ampire testimonials" width="800" height="527"&gt;&lt;/a&gt;&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%2F8f9eaqlkfeuf1sy11hy6.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%2F8f9eaqlkfeuf1sy11hy6.png" alt="tailus ampire home hero section" width="800" height="527"&gt;&lt;/a&gt;&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%2F0wy1s49oq9006hiknt5e.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%2F0wy1s49oq9006hiknt5e.png" alt="tailus ampire contact page" width="800" height="527"&gt;&lt;/a&gt;&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%2Fpx5pqsuy225lyq0gkvcp.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%2Fpx5pqsuy225lyq0gkvcp.png" alt="tailus ampire pricing plans comparator" width="800" height="527"&gt;&lt;/a&gt;&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%2Fb4ic8pd9rjwmj95kvf5e.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%2Fb4ic8pd9rjwmj95kvf5e.png" alt="tailus ampire about hero section" width="800" height="527"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And more...&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next ?
&lt;/h2&gt;

&lt;p&gt;I wrote this article to let you discover these ressources that you can use in your next tailwindcss project to make your ideas stand out.&lt;/p&gt;

&lt;p&gt;Let me know what you think about all of the above, in the comments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Find everything here&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tailus.io/blocks" rel="noopener noreferrer"&gt;Blocks&lt;/a&gt;&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=TailusUI.tailus-snippets" rel="noopener noreferrer"&gt;Snippets&lt;/a&gt;&lt;br&gt;
&lt;a href="https://tailus.gumroad.com" rel="noopener noreferrer"&gt;Templates&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tailus.io" rel="noopener noreferrer"&gt;More on our website&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tailwindcss</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to build a custom file input with tailwind css</title>
      <dc:creator>Méschac Irung</dc:creator>
      <pubDate>Fri, 02 Dec 2022 18:21:47 +0000</pubDate>
      <link>https://dev.to/tailus/how-to-build-a-custom-file-input-with-tailwind-css-3mb6</link>
      <guid>https://dev.to/tailus/how-to-build-a-custom-file-input-with-tailwind-css-3mb6</guid>
      <description>&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%2Fxhbujr5cu3hyoaotw46s.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%2Fxhbujr5cu3hyoaotw46s.png" alt="custom file input" width="800" height="472"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;"&lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; elements with type="file" let the user choose one or more files from their device storage. Once chosen, the files can be uploaded to a server using form submission, or manipulated using JavaScript code and the File API". Source : &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file" rel="noopener noreferrer"&gt;MDN&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And looks like this by default :&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%2F6me0iirg0voc5xgcsj1i.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%2F6me0iirg0voc5xgcsj1i.png" alt="native file input" width="800" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Styling the file input is easier than it seems to be, actually you can't really design a modern looking file input by applying utilities directly to the input:file element itself (If exists any way, let me know in the comments).&lt;/p&gt;

&lt;p&gt;In this article, I will guide you step by step to building a simple modern looking file input using Tailwind Css.&lt;/p&gt;

&lt;h2&gt;
  
  
  Nest the input tag into the label tag
&lt;/h2&gt;

&lt;p&gt;You can use label and input tags as peer elements into a &lt;code&gt;div&lt;/code&gt; but I prefer nesting the input tag into the label to avoid using a &lt;code&gt;div&lt;/code&gt; tag, you have the same result for both ways of doing.&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;label for="doc"&amp;gt;
   &amp;lt;input type="file" id="doc" name="doc" hidden/&amp;gt;
&amp;lt;/label&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;for&lt;/code&gt; attribute of the &lt;code&gt;label&lt;/code&gt; tag have to have the same content as the &lt;code&gt;id&lt;/code&gt; attribute of the &lt;code&gt;input&lt;/code&gt; tag so that the input action can be trigged by pressing the label element.&lt;/p&gt;

&lt;p&gt;You need to hide the input element using &lt;code&gt;hidden&lt;/code&gt; attribute or the "hidden" tailwind css utility as you don't need it to appear on the screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding other content
&lt;/h2&gt;

&lt;p&gt;Right here you shouldn't have anything on your screen, you need to add an illustration icon, a short title and a description to your component.&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;label for="doc"&amp;gt;
   &amp;lt;img src="https://demo.tailus.io/images/icons/upload.webp" alt="upload icon" width="512" height="512" /&amp;gt;
   &amp;lt;div&amp;gt;
      &amp;lt;h4&amp;gt;Upload a file&amp;lt;/h4&amp;gt;
      &amp;lt;span&amp;gt;Max 2 MO &amp;lt;/span&amp;gt;
   &amp;lt;/div&amp;gt;
   &amp;lt;input type="file" id="doc" name="doc" hidden/&amp;gt;
&amp;lt;/label&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It should look like this now :&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%2F767au3dgposinss7yhwe.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%2F767au3dgposinss7yhwe.png" alt="file input unstyled" width="800" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Right now you only wrote html, let's add some tailwind css utilities to style the component.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding tailwind css utilities
&lt;/h2&gt;

&lt;p&gt;You need to add border, rounded corners and a background to the &lt;code&gt;label&lt;/code&gt; tag, the illustration is bigger than it should be, you need to align the image and the &lt;code&gt;div&lt;/code&gt; tag containing the title and the description in the same row...&lt;/p&gt;

&lt;p&gt;Add some tailwind css utilities to the elements to have the needed result :&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;label for="doc" class="flex items-center p-4 gap-3 rounded-3xl border border-gray-300 border-dashed bg-gray-50 cursor-pointer"&amp;gt;
   &amp;lt;img class="h-16 w-auto" src="https://demo.tailus.io/images/icons/upload.webp" alt=""&amp;gt;. 
   &amp;lt;div class="space-y-2"&amp;gt;
      &amp;lt;h4 class="text-base font-semibold text-gray-700"&amp;gt;Upload a file&amp;lt;/h4&amp;gt;
      &amp;lt;span class="text-sm text-gray-500"&amp;gt;Max 2 MO&amp;lt;/span&amp;gt;
   &amp;lt;/div&amp;gt;
   &amp;lt;input type="file" id="doc" name="doc" accept="png, jpg" hidden/&amp;gt;
&amp;lt;/label&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And voila, you should have the file input component looking like in the article cover.&lt;/p&gt;

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

&lt;p&gt;This is how I create a custom file input with tailwind css, there is still different ways of doing to have the same result, you can go even far with JavaScript by adding more behaviors. &lt;/p&gt;

&lt;h2&gt;
  
  
  More Tips
&lt;/h2&gt;

&lt;p&gt;Want to take your TailwindCSS skills to the next level? &lt;strong&gt;Tailtips&lt;/strong&gt; is packed with actionable tips and tricks to help you build better, faster, and smarter with TailwindCSS. From creative solutions like gradient borders to advanced techniques and best practices, &lt;strong&gt;Tailtips&lt;/strong&gt; has everything you need to master TailwindCSS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tailtips.dev/" rel="noopener noreferrer"&gt;Discover Tailtips&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tailwindcss</category>
      <category>css</category>
      <category>html</category>
    </item>
    <item>
      <title>Apply tailwindcss classes to child elements via the parent.</title>
      <dc:creator>Méschac Irung</dc:creator>
      <pubDate>Tue, 15 Nov 2022 09:20:52 +0000</pubDate>
      <link>https://dev.to/tailus/apply-tailwindcss-classes-to-child-elements-via-the-parent-41pl</link>
      <guid>https://dev.to/tailus/apply-tailwindcss-classes-to-child-elements-via-the-parent-41pl</guid>
      <description></description>
    </item>
    <item>
      <title>Apply tailwindcss classes to child elements via the parent</title>
      <dc:creator>Méschac Irung</dc:creator>
      <pubDate>Mon, 14 Nov 2022 12:38:27 +0000</pubDate>
      <link>https://dev.to/tailus/apply-tailwindcss-classes-to-child-elements-via-the-parent-2i44</link>
      <guid>https://dev.to/tailus/apply-tailwindcss-classes-to-child-elements-via-the-parent-2i44</guid>
      <description>&lt;p&gt;Doing the same thing all the time is boring !&lt;/p&gt;

&lt;p&gt;This often happens when you have to apply the same style to child elements with the same function, if you want to change something, you have to do it individually for each element.&lt;/p&gt;

&lt;p&gt;Fortunately today's css allows us to write selectors that can make it easier for us to manage the style of child elements through their parent, and in this article we are going to find out how to do it with tailwindcss. &lt;/p&gt;

&lt;p&gt;To show you the relevance of applying tailwindcss utilities to child elements via the parent, I will guide you in building a simple card by focusing on user avatars where you will apply a custom variant.&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%2Fbz2jz5n5okdt0pdkk6df.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%2Fbz2jz5n5okdt0pdkk6df.png" alt="card component" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/P2UGvi7goOo" rel="noopener noreferrer"&gt;Watch video&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Common use
&lt;/h2&gt;

&lt;p&gt;What we often do is to add tailwindcss utilities to each child element :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"h-14 w-14 rounded-full ring-4 ring-white object-cover duration-300 hover:ring-blue-100"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a natural way of applying css classes to an element but you probably know that adding a lot of classes can make your html difficult to read and repetitions are boring to see. We are used to this because of tailwindcss and can't complain about it when you know the advantages it provides.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My avatars stacked list will look like&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"flex -space-x-2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"h-14 w-14 rounded-full ring-4 ring-white object-cover duration-300 hover:ring-blue-100"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"h-14 w-14 rounded-full ring-4 ring-white object-cover duration-300 hover:ring-blue-100"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"h-14 w-14 rounded-full ring-4 ring-white object-cover duration-300 hover:ring-blue-100"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"h-14 w-14 rounded-full ring-4 ring-white object-cover duration-300 hover:ring-blue-100"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"h-14 w-14 rounded-full ring-4 ring-white object-cover duration-300 hover:ring-blue-100"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is still ways to limit repetitions in your html when using tailwindcss : Creating a component css class with the &lt;a class="mentioned-user" href="https://dev.to/apply"&gt;@apply&lt;/a&gt; directive to group all the utilities, or using JavaScript Frameworks like Angular, React, Vue, Svelte… to build custom components.&lt;/p&gt;

&lt;p&gt;I prefer adding all utilities to an element and I sometimes don't use a Frontend framework so the efficient way to limit repetitions when building the avatars stacked list of my card will be to apply all classes to the &lt;code&gt;&amp;lt;img src="" /&amp;gt;&lt;/code&gt; tag via the parent element.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In css we'd basically use this selector :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.avatars&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;*&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nl"&gt;width&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;3.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="nl"&gt;height&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Arbitrary variant
&lt;/h2&gt;

&lt;p&gt;One of the best features of tailwindcss is the ability to add values or selectors that are not by default in the framework directly in your html so you don't need to write css no more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Applying this with tailwindcss will look like :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"[&amp;amp;&amp;gt;*]:w-14 [&amp;amp;&amp;gt;*]:h-14"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;And the whole list should be :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"flex -space-x-2 [&amp;amp;&amp;gt;*]:h-14 [&amp;amp;&amp;gt;*]:w-14 [&amp;amp;&amp;gt;*]:rounded-full [&amp;amp;&amp;gt;*]:ring-4 [&amp;amp;&amp;gt;*]:ring-white [&amp;amp;&amp;gt;*]:object-cover [&amp;amp;&amp;gt;*]:duration-300 hover:[&amp;amp;&amp;gt;*]:ring-blue-100"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Like me you would certainly get tired of seeing the &lt;code&gt;[&amp;amp;&amp;gt;*]&lt;/code&gt; arbitrary variant and a readable name will make easier to use and reuse. &lt;/p&gt;

&lt;h2&gt;
  
  
  Create a custom variant
&lt;/h2&gt;

&lt;p&gt;To fix this, create a custom variant with a readable name that you will use instead of &lt;code&gt;[&amp;amp;&amp;gt;*]&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You need to do this in your &lt;code&gt;tailwind.config.js&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To get started import Tailwind’s plugin function from &lt;code&gt;tailwindcss/plugin&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const plugin = require('tailwindcss/plugin');&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;plugin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tailwindcss/plugin&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;extend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="c1"&gt;// ...&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After importing the plugin function you can now create the custom variant inside the plugins array. Call the addVariant function, passing in the name "children", and a format string &lt;code&gt;&amp;amp;&amp;gt;*&lt;/code&gt; that represents how the selector should be modified.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const plugin = require('tailwindcss/plugin');

module.exports = {
  theme: {
    extend: {
      // ...
    },
  },
  plugins: [
    plugin(function({ addVariant }) {
      addVariant('children', '&amp;amp;&amp;gt;*')
    })
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can replace the &lt;code&gt;[&amp;amp;&amp;gt;*]&lt;/code&gt; arbitrary by the custom variant you have just created in the config file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The html should now look like :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"flex -space-x-2 children:h-14 children:w-14 children:rounded-full children:ring-4 children:ring-white children:object-cover children:duration-300 hover:children:ring-blue-100"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;This way of doing can make your html less difficult to read because it prevents from repeating again and again the same utilities to the child elements that have the same function and designed the same.&lt;/p&gt;

&lt;h2&gt;
  
  
  More Tips
&lt;/h2&gt;

&lt;p&gt;Want to take your TailwindCSS skills to the next level? &lt;strong&gt;Tailtips&lt;/strong&gt; is packed with actionable tips and tricks to help you build better, faster, and smarter with TailwindCSS. From creative solutions like gradient borders to advanced techniques and best practices, &lt;strong&gt;Tailtips&lt;/strong&gt; has everything you need to master TailwindCSS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tailtips.dev/" rel="noopener noreferrer"&gt;Discover Tailtips&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>webdev</category>
      <category>css</category>
      <category>html</category>
    </item>
  </channel>
</rss>
