<?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: shecodez</title>
    <description>The latest articles on DEV Community by shecodez (@shecodez).</description>
    <link>https://dev.to/shecodez</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F449239%2F1662fb23-ec45-417b-97cc-81bbd5acbfae.png</url>
      <title>DEV Community: shecodez</title>
      <link>https://dev.to/shecodez</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shecodez"/>
    <language>en</language>
    <item>
      <title>TypeScript used to be on my $#!% 💩 list  </title>
      <dc:creator>shecodez</dc:creator>
      <pubDate>Wed, 01 Dec 2021 19:20:44 +0000</pubDate>
      <link>https://dev.to/shecodez/typescript-used-to-be-on-my-list-42l9</link>
      <guid>https://dev.to/shecodez/typescript-used-to-be-on-my-list-42l9</guid>
      <description>&lt;h2&gt;
  
  
  JavaScript (JS)
&lt;/h2&gt;

&lt;p&gt;JS - a high-level, ECMAScript, interpreted / just-in-time compiled programming language developed by Brendan Eich of Netscape. Not to be confused with &lt;a href="https://dev.java/"&gt;Java&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;JavaScript was initially created to “make web pages alive”.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;well known - JS is almost as old as the internet&lt;/li&gt;
&lt;li&gt;JS is an OOP (object oriented programming) language&lt;/li&gt;
&lt;li&gt;JS is single-threaded&lt;/li&gt;
&lt;li&gt;but JS is weakly and dynamically typed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👩🏽‍💻 (me): Good ol' &lt;a href="https://www.javascript.com/"&gt;JavaScript&lt;/a&gt;, what more can I say about one of the worlds most popular scripting language? 🌎 (world): &lt;strong&gt;Learn to &lt;a href="https://www.typescriptlang.org/"&gt;TypeScript&lt;/a&gt; or GTFO&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So I started learning TypeScript. Not gonna lie it was so painful in the beginning. I hadn't been working with JS long enough, understand JS well enough, or become annoyed enough by all the silly JS errors / browser compatibility issues to appreciate something like TS. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Thus, TS &lt;strong&gt;was&lt;/strong&gt; very much so on my 💩 list, but I have since seen the light. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  TypeScript (TS)
&lt;/h2&gt;

&lt;p&gt;TS - a strongly typed programming language developed by Microsoft that builds on JavaScript, giving you better tooling at any scale.&lt;/p&gt;

&lt;h3&gt;
  
  
  Editor Checks
&lt;/h3&gt;

&lt;p&gt;Suddenly debugging was less of a nightmare with editor checks, because if TS doesn't like it, it wont compile.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const user = {
  id: l334,
  firstName: "Nicole",
  lastName: "Nobles",
  job: "Web developer",
}

console.log(user.name)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;JS doesn't know to alert me that user doesn't have a name property.&lt;/p&gt;

&lt;p&gt;but with TS I get an error:&lt;br&gt;
&lt;code&gt;Property 'name' does not exist on type { firstName: string; lastName: string; job: string }&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Auto-complete
&lt;/h3&gt;

&lt;p&gt;No more guessing what properties are on an object.&lt;/p&gt;
&lt;h3&gt;
  
  
  Interfaces
&lt;/h3&gt;

&lt;p&gt;If I made a User interface I can't add / remove any required properties to the object. &lt;/p&gt;

&lt;p&gt;*Note: adding &lt;code&gt;?&lt;/code&gt; after a property makes it optional.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;interface User {
  id: number
  firstName: string
  lastName: string
  job: string
  remote?: boolean
}

function updateUser(id: number, update: Partial&amp;lt;User&amp;gt;) {
  const data = getUser(id)
  const user = { ...data, ...update, city: "Hachiōji" }
  saveUser(id, user)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;TS will rightfully complain that 'city' does not exist on interface 'User'.&lt;/p&gt;

&lt;p&gt;This only the tip of the TS iceberg. Don't take my word for it, you can check out the documentation &lt;a href="https://www.typescriptlang.org/docs/"&gt;here&lt;/a&gt;.&lt;/p&gt;

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

&lt;p&gt;Once given a proper chance TypeScript has been amazingly helpful at saving me time and hard ache with features Editor Check, Auto-complete, and Interfaces. I won't lie sometimes I just slap &lt;code&gt;any&lt;/code&gt; on things and call it a day, but it eats away at me until I get it typed like the rest of the project. &lt;/p&gt;

&lt;p&gt;So, &lt;strong&gt;Keep calm, and Type(Script) on&lt;/strong&gt;. Thanks for reading! 😊 &lt;/p&gt;

</description>
      <category>typescript</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>discuss</category>
    </item>
    <item>
      <title>02 Waffles (Toasts) | Building 🚧 Dock-UI: Custom Tailwind CSS components for H010SPACE</title>
      <dc:creator>shecodez</dc:creator>
      <pubDate>Tue, 30 Nov 2021 16:06:50 +0000</pubDate>
      <link>https://dev.to/shecodez/02-waffles-building-dock-ui-custom-tailwind-css-components-for-h010space-2eae</link>
      <guid>https://dev.to/shecodez/02-waffles-building-dock-ui-custom-tailwind-css-components-for-h010space-2eae</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Every since I was introduced to Tailwind CSS - A utility-first CSS framework - I have wanted to build my own flavor of custom UI components with it. Even with so many wonderful UI component frameworks and libraries out there, some may have a few component styles I like, but none have all and only the components I like / find useful.&lt;/p&gt;

&lt;p&gt;So, I have decided to document building a complete set of my own custom components called Dock-UI.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Last time, we used Tailwind CSS to style the &lt;code&gt;&amp;lt;input /&amp;gt;&lt;/code&gt; element to look like the &lt;a href="https://dev.to/shecodez/building-dock-ui-custom-tailwind-css-components-for-h010space-1-text-fields-28dj"&gt;Material Design filled text field&lt;/a&gt;.  &lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is gon' be fun. We can stay up in the comment section, swapping dev stories, 'cause in this mornings post we're making waffles!&lt;/em&gt; 🧇 &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/bHIa5IFfKZI"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Question&lt;/strong&gt;: so what the duck 🦆 are &lt;em&gt;waffles&lt;/em&gt;? &lt;strong&gt;Answer&lt;/strong&gt;: waffles are fancy toast. &lt;/p&gt;

&lt;p&gt;I hope with this post you'll see that we're building more than just plain old toasts so I dub thee fancy toast sir &lt;code&gt;d-waffles&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So starting off the inspiration for style of this UI component comes from this &lt;a href="https://codepen.io/juliepark/pen/vjMOKQ"&gt;codepen&lt;/a&gt; by &lt;a href="https://codepen.io/juliepark"&gt;Julie Park&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML&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;&amp;lt;div class="d-waffle overflow-hidden w-64 py-2 border border-gray-600 m-1 rounded-lg shadow-md"&amp;gt;
  &amp;lt;div class="actions flex justify-end space-x-1 p-1 mr-2"&amp;gt;
    &amp;lt;div class="w-2 h-2 rounded-full bg-white bg-opacity-50 hover:bg-green-500 cursor-pointer"&amp;gt;
      &amp;lt;span class="sr-only"&amp;gt;ok&amp;lt;/span&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;div class="w-2 h-2 rounded-full bg-white hover:bg-red-500 cursor-pointer"&amp;gt;
      &amp;lt;span class="sr-only"&amp;gt;close&amp;lt;/span&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;

  &amp;lt;div class="relative success-face"&amp;gt;
    &amp;lt;div class="exclamation absolute left-7 -top-6 z-20 text-red-400 font-bold hidden"&amp;gt;-!-&amp;lt;/div&amp;gt;
    &amp;lt;div class="face absolute w-11 h-11 bg-white rounded-full border border-gray-800 top-0 left-4 z-10"&amp;gt;
      &amp;lt;span class="eye absolute w-1 h-1 bg-gray-900 rounded-full"&amp;gt;&amp;lt;/span&amp;gt;
      &amp;lt;span class="eye absolute w-1 h-1 bg-gray-900 rounded-full"&amp;gt;&amp;lt;/span&amp;gt;
      &amp;lt;span class="mouth absolute w-2 h-2 rounded-full"&amp;gt;&amp;lt;/span&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;div class="shadow absolute w-10 h-1 bg-gray-900 bg-opacity-30 left-5 top-11 z-10"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
  &amp;lt;div class="message ml-16 text-white"&amp;gt;
    &amp;lt;h4 class="mx-2 text-sm font-bold uppercase"&amp;gt;Success&amp;lt;/h4&amp;gt;
    &amp;lt;p class="mx-2 text-xs text-gray-800"&amp;gt;We made a waffle! 🧇&amp;lt;/p&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;SCSS&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;.d-waffle {
  min-height: 5rem;
}

.d-waffle .message h4 {
  text-shadow: 1px 1px #222;
  letter-spacing: 2px;
}

.d-waffle .eye {
  top: 40%;
  left: 21%;
}
.d-waffle .eye:nth-of-type(2) {
  left: 68%;
}

.d-waffle .shadow {
  border-radius: 50%;
}

.d-waffle .mouth {
  top: 43%;
  left: 41%;
}

.d-waffle .success-face .mouth {
  border: 1px solid;
  border-color: transparent #777 #777 transparent;
  transform: rotate(45deg);
}

$white: #fcfcfc;
$grey: #ccc;
$dark: #777;
$error: #ef8d9c;
$orange: #ffc39e;
$success: #b0db7d;
$lime: #99dbb4;
$blue: #7db0db;
$purple: #7d81db;
$yellow: #efe08d;
$peach: #efaf8d;

.d-waffle {
  //@apply bg-gradient-to-br from-green-500 to-indigo-300;
  background: linear-gradient(to bottom right, $success 40%, $lime 100%);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That gives us this cute little guy.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/shecodez/embed/QWMXVMQ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Lets add the CSS for the error, info, and warning waffle background.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SCSS&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;$white: #fcfcfc;
$grey: #ccc;
$dark: #777;
$error: #ef8d9c;
$orange: #ffc39e;
$success: #b0db7d;
$lime: #99dbb4;
$blue: #7db0db;
$purple: #7d81db;
$yellow: #efe08d;
$peach: #efaf8d;

.d-waffle.error-waffle {
  /*@apply bg-gradient-to-bl from-error-500 to-yellow-500;*/
  background: linear-gradient(to bottom left, $error 40%, $orange 100%);
}

.d-waffle.info-waffle {
  /*@apply bg-gradient-to-br from-info-500 to-purple-500;*/ 
  background: linear-gradient(to bottom right, $blue 40%, $purple 100%);
}

.d-waffle.warning-waffle {
  /*@apply bg-gradient-to-bl from-warning-500 to-red-300;*/
  background: linear-gradient(to bottom left, $yellow 40%, $peach 100%); 
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Success is the default &lt;code&gt;.d-waffle&lt;/code&gt; background so we can add &lt;code&gt;.error-waffle&lt;/code&gt;, &lt;code&gt;.info-waffle&lt;/code&gt;, or &lt;code&gt;.warning-waffle&lt;/code&gt; to change the background colors.&lt;/p&gt;

&lt;p&gt;Now all we have to do is add the styles for the different faces and animate them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SCSS&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;.d-waffle .success-face .mouth {
  border: 1px solid;
  border-color: transparent #777 #777 transparent;
  transform: rotate(45deg);
}

.d-waffle .error-face .mouth {
  border: 1px solid;
  border-color: #777 transparent transparent #777;
  transform: rotate(45deg);
}

.d-waffle .info-face .mouth {
  border: 1px solid #777;
  border-radius: 0;
}

.d-waffle .warning-face .mouth {
  top: 50%;
  height: 1px;
  border-bottom: 1px solid #777;
  border-radius: 0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the finally the animations!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SCSS&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;.d-waffle .success-face .face {
  animation: bounce 1s ease-in infinite;
}
.d-waffle .success-face .shadow {
  animation: scale 1s ease-in infinite;
}

.d-waffle .error-face .face {
  left: initial;
  right: 5%;
  animation: roll 3s ease-in-out infinite;
}
.d-waffle .error-face .shadow {
  left: initial;
  right: 5%;
  animation: move 3s ease-in-out infinite;
}

.d-waffle .info-face .mouth {
  animation: talk 2s ease-in-out infinite;
}

.d-waffle .warning-face .eye {
  animation: blink 2s steps(5, start) infinite;
}

.d-waffle.warning-waffle .exclamation {
  text-shadow: 1px 1px #777;
  animation: scale 1s ease-in-out infinite;
}

@keyframes bounce {
  50% {
    transform: translateY(-10px);
  }
}

@keyframes scale {
  50% {
    transform: scale(0.85);
  }
}

@keyframes roll {
  0% {
    transform: rotate(0deg);
    right: 5%;
  }
  50% {
    right: 45%;
    transform: rotate(-175deg);
  }
  100% {
    transform: rotate(0deg);
    right: 5%;
  }
}

@keyframes move {
  0% {
    right: 5%;
  }
  50% {
    right: 45%;
  }
  100% {
    right: 5%;
  }
}

@keyframes talk {
  0% {
    height: 8px;
  }
  45% {
    height: 2px;
  }
  75% {
    height: 6px;
  }
  85% {
    height: 4px;
  }
  100% {
    height: 6px;
  }
}

@keyframes blink {
  0% {
    height: 4px;
  }
  85% {
    height: 4px;
  }
  95% {
    height: 2px;
  }
  100% {
    height: 1px;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/shecodez/embed/ExwxrxO?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;And with that we've completed the &lt;code&gt;d-waffle&lt;/code&gt; dock-ui component. Of course it's very basic right now, but I leave the upgrades for you and future me. Thanks for reading! 😊  &lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>css</category>
    </item>
    <item>
      <title>01 Text Field | Building 🚧 Dock-UI: Custom Tailwind CSS components for H010SPACE</title>
      <dc:creator>shecodez</dc:creator>
      <pubDate>Thu, 18 Nov 2021 15:55:16 +0000</pubDate>
      <link>https://dev.to/shecodez/building-dock-ui-custom-tailwind-css-components-for-h010space-1-text-fields-28dj</link>
      <guid>https://dev.to/shecodez/building-dock-ui-custom-tailwind-css-components-for-h010space-1-text-fields-28dj</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Every since I was introduced to Tailwind CSS - A utility-first CSS framework - I have wanted to build my own flavor of custom UI components with it. Even with so many wonderful UI component frameworks and libraries out there, some may have a few component styles I like, but none have all and only the components I like / find useful.&lt;/p&gt;

&lt;p&gt;So, I have decided to document building a complete set of my own custom components called Dock-UI.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;While H010SPACE is in development, the only accessible page for awhile will be the landing page which has one main element, a sign up &lt;code&gt;&amp;lt;form /&amp;gt;&lt;/code&gt; for the mailing list with a email &lt;code&gt;&amp;lt;input /&amp;gt;&lt;/code&gt; and submit &lt;code&gt;&amp;lt;button /&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So, first up we're building an &lt;code&gt;&amp;lt;input /&amp;gt;&lt;/code&gt; with &lt;a href="https://tailwindcss.com/"&gt;Tailwind CSS&lt;/a&gt;&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Of all the frameworks and libraries I've seen so far, my favorite style for &lt;code&gt;&amp;lt;input /&amp;gt;&lt;/code&gt; is by &lt;a href="https://material.io/components/text-fields"&gt;Material Design&lt;/a&gt;. Today we'll build the Material Design Filled Text field with Tailwind CSS.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: I usually use &lt;a href="https://windicss.org/"&gt;Windi CSS&lt;/a&gt; instead of Tailwind CSS for the speed ⚡, but the classes work the exact same for both.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Starting with the foundation we have:&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;input type="email" placeholder="E-Mail" class="border" /&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that we have the base lets style it up. According to Material Design the &lt;a href="https://material.io/components/text-fields#anatomy"&gt;anatomy&lt;/a&gt; of a text field consists of:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Container&lt;/li&gt;
&lt;li&gt;Leading icon (optional)&lt;/li&gt;
&lt;li&gt;Label text&lt;/li&gt;
&lt;li&gt;Input text&lt;/li&gt;
&lt;li&gt;Trailing icon (optional)&lt;/li&gt;
&lt;li&gt;Activation indicator&lt;/li&gt;
&lt;li&gt;Helper text (optional)
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div&amp;gt;
    &amp;lt;label for="email"&amp;gt;E-Mail&amp;lt;/label&amp;gt;
    &amp;lt;input type="email" name="email" class="border" /&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For simplicity I've left out the &lt;em&gt;optional&lt;/em&gt; bits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; the finished code is right below take it, use it, and modify the crap 💩 out of it. A brief explanation of the code will follow if you want to stick around for it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML&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;&amp;lt;div class="d-textfield relative bg-black bg-opacity-10 px-4 pt-5 pb-1.5 rounded-t border-b border-black border-opacity-40"&amp;gt;
    &amp;lt;input type="email" name="email" placeholder=" " class="block bg-transparent w-full appearance-none focus:outline-none text-sm" /&amp;gt;
    &amp;lt;label for="email" class="absolute top-0 transform translate-y-1/2 duration-300"&amp;gt;E-Mail&amp;lt;/label&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;SCSS&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;.d-textfield:focus-within {
  border-bottom: 2px solid blue;
  background-color: rgba(0,0,0, 0.20) !important;
  &amp;amp; input {
    caret-color: blue;
  }
  &amp;amp; label {
    color: blue;
  }
}

.d-textfield label {
  z-index: -1;
}

.d-textfield input:focus-within ~ label,
.d-textfield input:not(:placeholder-shown) ~ label {
  //@apply transform scale-75 -translate-y-6;
  transform: translate(-0.4em) scale(0.74);
}

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

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/shecodez/embed/zYdyXOK?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Part of the beauty of Tailwind CSS is that the utility classes make it pretty clear what's going on. Plus because you can extend tailwind the SCSS can be made even shorter.&lt;/p&gt;

&lt;p&gt;For example we can change the border color when the input is focused using the pseudo-class &lt;code&gt;focus-within&lt;/code&gt;. We can enable the focus-within variant in Tailwind for &lt;code&gt;borderColor&lt;/code&gt; by adding it in the &lt;code&gt;tailwind.config.js&lt;/code&gt; or &lt;code&gt;windi.config.js&lt;/code&gt; under the variants section:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;tailwind.config.js&lt;/strong&gt; / &lt;strong&gt;windi.config.js&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;variants: {
  borderColor: ['responsive', 'hover', 'focus', 'focus-within'],
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then we can add the &lt;code&gt;focus-within:border-blue-500&lt;/code&gt; class to the input container &lt;code&gt;&amp;lt;div /&amp;gt;&lt;/code&gt; to change the border color on focus and remove  the &lt;code&gt;.d-textfield:focus-within { border-bottom: 2px solid blue; }&lt;/code&gt; from the SCSS.&lt;/p&gt;

&lt;p&gt;The same thing could be done with the negative &lt;code&gt;z-index&lt;/code&gt; for the &lt;code&gt;&amp;lt;label /&amp;gt;&lt;/code&gt;. Just extend the Tailwind theme to generate a negative z-index for you:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;tailwind.config.js&lt;/strong&gt; / &lt;strong&gt;windi.config.js&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;theme: {
  extend: {
    zIndex: {
      "-1": "-1",
    },
  },
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With that you can add the class &lt;code&gt;-z-1&lt;/code&gt; to the &lt;code&gt;&amp;lt;label /&amp;gt;&lt;/code&gt;, and remove &lt;code&gt;.d-textfield label { z-index: -1; }&lt;/code&gt; from the SCSS.&lt;/p&gt;

&lt;p&gt;And with that we've completed our first dock-ui component. Of course it's very basic right now but I leave the upgrades for you and future me. 😊  &lt;/p&gt;

&lt;p&gt;Thanks for reading! 🖖&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>css</category>
    </item>
    <item>
      <title>00 Intro | Building 🚧 Dock-UI: Custom Tailwind CSS components for H010SPACE  </title>
      <dc:creator>shecodez</dc:creator>
      <pubDate>Tue, 16 Nov 2021 19:38:26 +0000</pubDate>
      <link>https://dev.to/shecodez/building-dock-ui-custom-tailwind-css-components-for-h010space-intro-3kj4</link>
      <guid>https://dev.to/shecodez/building-dock-ui-custom-tailwind-css-components-for-h010space-intro-3kj4</guid>
      <description>&lt;p&gt;Every since I was introduced to &lt;a href="https://tailwindcss.com/"&gt;Tailwind CSS&lt;/a&gt; - A utility-first CSS framework - I have wanted to build my own flavor of custom UI components with it. Even with so many wonderful UI component frameworks and libraries out there, some may have a few component styles I like, but none have all and only the components I like / find useful. &lt;/p&gt;

&lt;p&gt;So, I have decided to document building a complete set of my own custom components called Dock-UI.  &lt;/p&gt;

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