<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/headless-ui-with-stimulusjs-and-an-outlet-auvvqtljp" -->

---
title: Headless UI with StimulusJS and an Outlet | daily.dev
description: Learn how to convert Headless UI React components to use Stimulus and add interactivity. See how to create a Switch component and update a form value using...
canonical: https://daily.dev/posts/headless-ui-with-stimulusjs-and-an-outlet-auvvqtljp
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Headless UI with StimulusJS and an Outlet | daily.dev
og:description: Learn how to convert Headless UI React components to use Stimulus and add interactivity. See how to create a Switch component and update a form value using...
og:url: https://daily.dev/posts/headless-ui-with-stimulusjs-and-an-outlet-auvvqtljp
og:image: https://api.daily.dev/og/posts/AuvvQtljP.png
og:image:alt: Headless UI with StimulusJS and an Outlet
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Headless UI with StimulusJS and an Outlet

**[Ruby Flow](https://daily.dev/sources/rubyflow)** · 3 min read · 2 upvotes · 1 comments

## Summary

Learn how to convert Headless UI React components to use Stimulus and add interactivity. See how to create a Switch component and update a form value using Stimulus Outlets.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://onrails.blog/2024/05/08/headless-ui-with-stimulusjs-and-an-outlet-screencast/>

## Community discussion

Top comments from developers on daily.dev.

**@tipiirai** · 0 upvotes

> > Learn how to convert Headless UI React components to use Stimulus and add interactivity. See how to create a Switch component and update a form value using Stimulus Outlets.
>
> Oh my! Another buzzword-heavy article about modern day frontend development. I'll pass.

---

Tags: [#tailwind-css](https://daily.dev/tags/tailwind-css)

[View this post on daily.dev](https://daily.dev/posts/headless-ui-with-stimulusjs-and-an-outlet-auvvqtljp)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Headless UI with StimulusJS and an Outlet","url":"https://daily.dev/posts/headless-ui-with-stimulusjs-and-an-outlet-auvvqtljp","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/headless-ui-with-stimulusjs-and-an-outlet-auvvqtljp"},"datePublished":"2024-05-09T18:08:14.320Z","dateModified":"2024-05-09T18:08:12.088Z","description":"Learn how to convert Headless UI React components to use Stimulus and add interactivity. See how to create a Switch component and update a form value using...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ca3dec17761398ef6c1f0ba52ece717a?_a=AQAEuiZ","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ca3dec17761398ef6c1f0ba52ece717a?_a=AQAEuiZ","isAccessibleForFree":true,"articleSection":"Ruby Flow","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Ruby Flow","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/a21aaa8bcbbf448193a016895c90a0e1","url":"https://daily.dev/sources/rubyflow"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/headless-ui-with-stimulusjs-and-an-outlet-auvvqtljp","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"tailwind-css","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Ruby Flow","item":"https://daily.dev/sources/rubyflow"},{"@type":"ListItem","position":3,"name":"Headless UI with StimulusJS and an Outlet"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/headless-ui-with-stimulusjs-and-an-outlet-auvvqtljp","comment":[{"@type":"Comment","text":"Learn how to convert Headless UI React components to use Stimulus and add interactivity. See how to create a Switch component and update a form value using Stimulus Outlets.\n\nOh my! Another buzzword-heavy article about modern day frontend development. I’ll pass.","datePublished":"2024-05-16T13:43:48.757Z","url":"https://daily.dev/posts/AuvvQtljP#c-uNfnTm9Lv","author":{"@type":"Person","name":"Tero Piirainen","url":"https://daily.dev/tipiirai","image":"https://lh3.googleusercontent.com/a/ACg8ocJ8OBLq8Drvr3iONBrRsoQkkiH-Jty6vOhu325gRy020oM=s96-c"}}]}
```

