<?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: eitanwaxman</title>
    <description>The latest articles on DEV Community by eitanwaxman (@eitanwaxman).</description>
    <link>https://dev.to/eitanwaxman</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%2F880956%2F0f49b5d9-4951-48ee-b22c-77395c5fdeab.jpeg</url>
      <title>DEV Community: eitanwaxman</title>
      <link>https://dev.to/eitanwaxman</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eitanwaxman"/>
    <language>en</language>
    <item>
      <title>What does the next generation of AI eCom look like?</title>
      <dc:creator>eitanwaxman</dc:creator>
      <pubDate>Sun, 14 Jul 2024 20:01:49 +0000</pubDate>
      <link>https://dev.to/eitanwaxman/what-does-the-next-generation-of-ai-ecom-look-like-3e52</link>
      <guid>https://dev.to/eitanwaxman/what-does-the-next-generation-of-ai-ecom-look-like-3e52</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/wix"&gt;Wix Studio Challenge &lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;For this challenge I chose to explore a future of AI driven eCommerce. I tried to take AI innovation beyond the typical chatbot or content generation use case and break the shopping experience free of what has become the standard for the past 10+ years. &lt;/p&gt;

&lt;p&gt;By tapping into the design capabilities of Wix Studio, the Velo APIs of Wix's eCommerce business solution Wix Store, and OpenAIs completion models I created an immersive shopping experience like nothing you have seen before (I hope 😅). &lt;/p&gt;

&lt;p&gt;In this shop instead of browsing and interacting alone by clicking around, you are accompanied by an AI companion who shows your products, adds them to your cart, and even helps take you to the checkout when your done.&lt;/p&gt;

&lt;p&gt;While this MVP only accommodates text based interactions - the concept opens up a world of more interactive &lt;strong&gt;and accessible&lt;/strong&gt; shopping experiences using voice and vision capabilities of modern AI models.   &lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Try it out yourself here: &lt;a href="https://eitanwaxman.wixstudio.io/ai-store" rel="noopener noreferrer"&gt;https://eitanwaxman.wixstudio.io/ai-store&lt;/a&gt;&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Development Journey
&lt;/h2&gt;

&lt;p&gt;I started out by building an 'agent' that can create Vector embeddings using the product data and store it in a Wix Collection. This agent runs whenever a product is added or updated in the Wix Store. These embeddings serve as the foundation for the semantic search capabilities of the shop. &lt;br&gt;
&lt;em&gt;Note: In an ideal world I would utilize a Vector database for this but opted to stay in Wix to save time.&lt;/em&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%2F509a3y61myfkcnacu9j4.png" 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%2F509a3y61myfkcnacu9j4.png" alt="Creating an embedding with OpenAI"&gt;&lt;/a&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%2Fnur1v7bgowbu4953s1r2.png" 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%2Fnur1v7bgowbu4953s1r2.png" alt="Saving that vector along with productId in the Wix CMS"&gt;&lt;/a&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%2F9hg17jq09hkul1nv0gui.png" 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%2F9hg17jq09hkul1nv0gui.png" alt="Invoking the agent when a new product is created"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next I moved on to building out the brain of the shop which essentially follows this process:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Receives a query from the user and gets the intent from the 'intent agent'. This intent is one of many actions the user might want to be taking in the shop such as browsing products, adding something to their cart, or checking out. &lt;/li&gt;
&lt;li&gt;Executes an action by interacting with the Velo APIs via a dedicated agent. These agents use AI to get a JSON object of parameters that are then passed to the API. &lt;/li&gt;
&lt;li&gt;Generates a plain text response based on: The companion personality, the conversation history, the action taken, and the data returned. &lt;/li&gt;
&lt;/ol&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%2F0h4xr8ojybdzd6sxilyi.png" 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%2F0h4xr8ojybdzd6sxilyi.png" alt="The intent identifier agent"&gt;&lt;/a&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%2Fvysg9yi1fqbl57ntz7fx.png" 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%2Fvysg9yi1fqbl57ntz7fx.png" alt="Using AI to get the line items for the cart API"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that it was a matter of tweaking, debugging, and elaborating on the above. &lt;/p&gt;

&lt;p&gt;Some challenges I encountered (some still not completely resolved 🙃):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Handling situations where multiple chain actions need to be taken based on a single user query. &lt;/li&gt;
&lt;li&gt;Handling special scenarios like product variants. &lt;/li&gt;
&lt;li&gt;Getting the AI not to confuse conversation history with facts and data. &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Which APIs and Libraries did you utilize?
&lt;/h2&gt;

&lt;p&gt;wix-stores-backend: Creating embeddings onProductCreated and onProductUpdated events. Also for retrieving product variants.&lt;br&gt;
wix-ecom-backend: Adding products to cart, other cart interactions and generating a checkout link. &lt;br&gt;
wix-data: Storing and retrieving embeddings.&lt;br&gt;
wix-fetch &amp;amp; wix-secrets-backend: Fetching responses from OpenAI APIs. &lt;br&gt;
wix-location-frontend: Navigation to the checkout link. &lt;br&gt;
wix-storage: Storing the companion selection in session. &lt;/p&gt;

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

</description>
      <category>devchallenge</category>
      <category>wixstudiochallenge</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>A Loading Bar So Beautiful You Can't Look Away 🌈</title>
      <dc:creator>eitanwaxman</dc:creator>
      <pubDate>Wed, 27 Jul 2022 01:12:58 +0000</pubDate>
      <link>https://dev.to/eitanwaxman/a-loading-bar-so-beautiful-you-cant-look-away-1nef</link>
      <guid>https://dev.to/eitanwaxman/a-loading-bar-so-beautiful-you-cant-look-away-1nef</guid>
      <description>&lt;p&gt;Wait for it...&lt;/p&gt;

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

&lt;p&gt;Yes you just spent 30 seconds watching that 😊&lt;/p&gt;

</description>
      <category>codepen</category>
      <category>css</category>
      <category>design</category>
      <category>ux</category>
    </item>
    <item>
      <title>What data structure is best for caching? An experiment 🧪</title>
      <dc:creator>eitanwaxman</dc:creator>
      <pubDate>Sun, 24 Jul 2022 14:12:51 +0000</pubDate>
      <link>https://dev.to/eitanwaxman/what-data-structure-is-best-for-caching-an-experiment-ef5</link>
      <guid>https://dev.to/eitanwaxman/what-data-structure-is-best-for-caching-an-experiment-ef5</guid>
      <description>&lt;p&gt;While trying to broaden my horizons about data structures, I learned about two native JavaScript structures I had never heard of - Sets and Maps.&lt;/p&gt;

&lt;p&gt;Now why had I never heard of them? Is it because I am a complete noob? Or maybe they are just not so common? (my nice way of saying useless).&lt;/p&gt;

&lt;p&gt;To figure it out I decided to run a small experiment to test the build and retrieval times for each of the big 4 - Arrays, Objects, Sets, and Maps. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here's what I did:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;First I tested &lt;strong&gt;Arrays&lt;/strong&gt;- constructing it with a for loop and retrieving using the indexOf method (for a worst case scenario item).
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myArray = []

function storeWithArray(array, itemToFind) {
    const startTime = Date.now()

    for (let i = 0; i &amp;lt; 10000000; i++) {
        array.push(i)
    }

    const buildTime = Date.now()
    console.log("Array Build Time: ", buildTime - startTime)

    console.log(array.indexOf(itemToFind) === itemToFind)

    const retrievalTime = Date.now()
    console.log("Array Retrieval Time: ", retrievalTime - buildTime)
}

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

&lt;/div&gt;



&lt;p&gt;Then I used the array I built to test the other three structures:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sets&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;function storeWithSet(array, itemToFind) {
    const startTime = Date.now()

    const mySet = new Set();

    array.forEach((item) =&amp;gt; {
        mySet.add(item)
    })

    const buildTime = Date.now()
    console.log("Set Build Time: ", buildTime - startTime)

    console.log(mySet.has(itemToFind))

    const retrievalTime = Date.now()
    console.log("Set Retrieval Time: ", retrievalTime - buildTime)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Objects&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;function storeWithObject(array, itemToFind) {
    const startTime = Date.now()

    const myObject = new Object();

    array.forEach((item) =&amp;gt; {
        myObject[item] = item;
    })
    const buildTime = Date.now()
    console.log("Object Build Time: ", buildTime - startTime)

    console.log(myObject[itemToFind] === itemToFind)

    const retrievalTime = Date.now()
    console.log("Object Retrieval Time: ", retrievalTime - buildTime)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Maps&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;function storeWithMap(array, itemToFind) {
    const startTime = Date.now()

    const myMap = new Map();

    array.forEach((item) =&amp;gt; {
        myMap.set(item, item)
    })
    const buildTime = Date.now()
    console.log("Map Build Time: ", buildTime - startTime)

    console.log(myMap.get(itemToFind) === itemToFind)

    const retrievalTime = Date.now()
    console.log("Map Retrieval Time: ", retrievalTime - buildTime)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And run time:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;storeWithArray(myArray, 9999999)
storeWithSet(myArray, 9999999)
storeWithObject(myArray, 9999999)
storeWithMap(myArray, 9999999)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here are the results:&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%2Fw1otudh4tckgpg05ern2.png" 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%2Fw1otudh4tckgpg05ern2.png" alt="results of experiment "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Unsurprisingly Array retrieval time was the longest, &lt;em&gt;but&lt;/em&gt; the build time was much shorter than Sets and Maps!&lt;/p&gt;

&lt;p&gt;Objects seem to be the clear winner with the shortest build time and marginally longer retrieval time than Maps and Sets (sometimes it even beat them).&lt;/p&gt;

&lt;p&gt;So basically if you need to store and retrieve information - objects are your best bet.&lt;/p&gt;

&lt;p&gt;Then what are Maps and Sets good for?&lt;br&gt;
I know they poses unique qualities - they are ordered like Arrays and can prevent duplicate values etc. But what is the use case that warrants their apparent inefficiency?&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>caching</category>
      <category>experiment</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Magnifying Glass for Text and more!</title>
      <dc:creator>eitanwaxman</dc:creator>
      <pubDate>Mon, 18 Jul 2022 20:57:17 +0000</pubDate>
      <link>https://dev.to/eitanwaxman/magnifying-glass-for-text-and-more-5a57</link>
      <guid>https://dev.to/eitanwaxman/magnifying-glass-for-text-and-more-5a57</guid>
      <description>&lt;p&gt;After discovering the backdrop-filter property - specifically "blur()" function - I thought it would be cool if there was also a "scale()" option. &lt;/p&gt;

&lt;p&gt;Unfortunately, I couldn't find anything of the sort. The closest thing I could find to scaling the element behind another element was &lt;a href="https://www.w3schools.com/howto/howto_js_image_magnifier_glass.asp"&gt;this W3 tutorial&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;But what about text?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And thus the magnifying glass was born:&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Open issues:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Magic numbers - spent a while trying to math it, but still haven't arrived at the formula that works well for different sizes and scales. &lt;/li&gt;
&lt;li&gt;linear-gradient of the lens doesn't show above images. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Although this is mostly just for fun, I think this has some real use cases for those who are hard of seeing - there is something to be said for magnification in context (and not just making the entire page bigger).&lt;/p&gt;

&lt;p&gt;Maybe a browser extension?&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;

</description>
      <category>codepen</category>
      <category>javascript</category>
      <category>showdev</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Magic Button 🧙‍♂️</title>
      <dc:creator>eitanwaxman</dc:creator>
      <pubDate>Wed, 13 Jul 2022 20:22:47 +0000</pubDate>
      <link>https://dev.to/eitanwaxman/magic-button-44ph</link>
      <guid>https://dev.to/eitanwaxman/magic-button-44ph</guid>
      <description>&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/eitanwaxman/embed/jOzMgqJ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;This button may look like any plain old button but actually, it's &lt;strong&gt;magic&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Or at least sort of. &lt;/p&gt;

&lt;p&gt;If you refresh the page this button may change. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why?&lt;/strong&gt;&lt;br&gt;
This button logs clicks and runs tests based on a predefined sample size for optimization.&lt;/p&gt;

&lt;p&gt;In other words, it does automatic A/B testing to provide the button that will convert the most. &lt;/p&gt;

&lt;p&gt;It still has a limited range of tests and the integration method is a little quirky but I think this is a viable prototype for a very useful embeddable.  &lt;/p&gt;

&lt;p&gt;You can see the full documentation on &lt;a href="https://github.com/eitanwaxman/magic-button"&gt;my GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Looking forward to your feedback!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>button</category>
      <category>marketing</category>
      <category>discuss</category>
    </item>
    <item>
      <title>A More Modern Youtube Interface</title>
      <dc:creator>eitanwaxman</dc:creator>
      <pubDate>Mon, 04 Jul 2022 19:42:02 +0000</pubDate>
      <link>https://dev.to/eitanwaxman/a-more-modern-youtube-interface-47mc</link>
      <guid>https://dev.to/eitanwaxman/a-more-modern-youtube-interface-47mc</guid>
      <description>&lt;p&gt;**The YouTube interface always seemed a bit clunky to me. **So I set out to try and redesign the video widget in a more dynamic way. Also just for fun tried to keep JS to a minimum. &lt;/p&gt;

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

&lt;p&gt;Things I was experimenting with in this pen:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Scaling using em.&lt;/li&gt;
&lt;li&gt;Flexbox inside a button.&lt;/li&gt;
&lt;li&gt;Video with rounded corners.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Overall I think as a user I would enjoy the immediate response of the UI and the dynamic scaling - the only possible downside I still haven't solved is the other widgets in the row moving aside.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;What do you think? &lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
P.S. anyone have a creative solution for one directional transition delays in CSS?&lt;/p&gt;

</description>
      <category>codepen</category>
      <category>youtube</category>
      <category>design</category>
      <category>ux</category>
    </item>
    <item>
      <title>Toggling Without JS - Buttons Reimagined 🤯</title>
      <dc:creator>eitanwaxman</dc:creator>
      <pubDate>Wed, 29 Jun 2022 02:37:34 +0000</pubDate>
      <link>https://dev.to/eitanwaxman/toggling-without-js-buttons-reimagined-2f4m</link>
      <guid>https://dev.to/eitanwaxman/toggling-without-js-buttons-reimagined-2f4m</guid>
      <description>&lt;p&gt;The story begins with wanting to recreate the "hamburger menu that animates into an X" that is quite popular these days. Oh and only using CSS.&lt;/p&gt;

&lt;p&gt;At first I tried to tap into the :focus pseudo class to control the changes. Something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;button{
...
}

//top line
button::after{
...
}

//bottom line
button::before{
...
}

button:focus::before{
transform: rotate(45deg);
}

etc...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The problem was that it couldn't be reverted back to the initial state by clicking on the button again. Only clicking outside the button could remove the focus.&lt;/p&gt;

&lt;p&gt;Then while watching a &lt;a href="https://www.youtube.com/watch?v=N8BZvfRD_eU"&gt;tutorial&lt;/a&gt; by my fav YouTube developer Web Dev Simplified it hit me. What about using a checkbox input instead of a button to manage the toggle?&lt;/p&gt;

&lt;p&gt;An hour or two later I arrived at this:&lt;/p&gt;

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

&lt;p&gt;I made some tweaks to the method such as using absolute and width: 0 to disappear the input but the overall concept is the same. &lt;/p&gt;

&lt;p&gt;This CSS magic kinda makes the checkbox type input the king of JS-less state. I decided to take it one step further. Could we implement an effect as well -such as the dropdown of the actual menu?&lt;/p&gt;

&lt;p&gt;After much struggle I can say the answer is - sort of.&lt;/p&gt;

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

&lt;p&gt;The checkbox/toggle can affect other elements as long as they are &lt;strong&gt;within CSS reach&lt;/strong&gt;. The elements must be at the same level as the toggle and share a parent.  &lt;/p&gt;

&lt;p&gt;All this jumping through hoops made me wonder - why isn't there a toggle pseudo class? Are there any other ways to implement toggle in CSS? Is this actually worthwhile and scalable?&lt;/p&gt;

&lt;p&gt;lmk ✌&lt;/p&gt;

</description>
      <category>css</category>
      <category>button</category>
      <category>toggle</category>
      <category>ux</category>
    </item>
    <item>
      <title>A Unique Approach to Form Validation 🙃</title>
      <dc:creator>eitanwaxman</dc:creator>
      <pubDate>Thu, 23 Jun 2022 03:28:07 +0000</pubDate>
      <link>https://dev.to/eitanwaxman/a-unique-approach-to-form-validation-30gc</link>
      <guid>https://dev.to/eitanwaxman/a-unique-approach-to-form-validation-30gc</guid>
      <description>&lt;p&gt;There are many common practices for throwing a validation error - red outlines, error messages, disabled buttons, etc. Today I want to explore an (extremely) innovative approach...&lt;/p&gt;

&lt;p&gt;But first please fill out the form &amp;gt;&lt;/p&gt;

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

&lt;p&gt;If you didn't, you may have noticed the "submit" button is a slippery little fella.&lt;/p&gt;

&lt;p&gt;This idea was originally just going to be a UX parody with an unclickable button. Then the idea struck me to make it a form validation feature giving it a semi-plausible implementation.  &lt;/p&gt;

&lt;p&gt;At first I thought it would be a 5 minute project, a simple form, some styling and a few event listeners. Then things got a bit complicated - first I had to think of how to randomize the movement in four directions and then on top of that I had to contain the movement within the viewport. &lt;/p&gt;

&lt;p&gt;As an afterthought I added a return to original state when the user shows intent of filling out the form (focus or input).&lt;/p&gt;

&lt;p&gt;All in all it was fun to code (which is what really counts) and who knows maybe one day this will become the golden standard 🤪.&lt;/p&gt;

</description>
      <category>ux</category>
      <category>forms</category>
      <category>validation</category>
      <category>codepen</category>
    </item>
    <item>
      <title>Disney+ hover UI with CSS</title>
      <dc:creator>eitanwaxman</dc:creator>
      <pubDate>Wed, 22 Jun 2022 11:08:19 +0000</pubDate>
      <link>https://dev.to/eitanwaxman/disney-hover-ui-with-css-4p20</link>
      <guid>https://dev.to/eitanwaxman/disney-hover-ui-with-css-4p20</guid>
      <description>&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/eitanwaxman/embed/jOZjNLG?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>codepen</category>
      <category>css</category>
      <category>webdev</category>
      <category>design</category>
    </item>
  </channel>
</rss>
