<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="313739" data-post-id="313739">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="adw632" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  adw632
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="LostKobrakai" data-post="21" data-topic="60395">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lostkobrakai/48/3072_2.png" class="avatar"> LostKobrakai:</div>
<blockquote>
<p>Though really you’d need to regularly check attributes for changes just as much as you’d need to check nested markup.</p>
</blockquote>
</aside>
<p>Fortunately custom element lifecycle callbacks let you know when the component is mounted, unmounted or the attributes change. Note that the inner custom elements do not live in the shadow DOM of the parent as the child has its <em>own</em> shadow DOM. It’s basically private shadow DOMs all the way down unless you specifically create a component to use the regular light DOM.</p>
<p>The custom element lifecycle callbacks include:</p>
<blockquote>
<p>connectedCallback(): called each time the element is added to the document. The specification recommends that, as far as possible, developers should implement custom element setup in this callback rather than the constructor.</p>
<p>disconnectedCallback(): called each time the element is removed from the document.</p>
<p>adoptedCallback(): called each time the element is moved to a new document.</p>
<p>attributeChangedCallback(): called when attributes are changed, added, removed, or replaced. See Responding to attribute changes for more details about this callback.</p>
</blockquote>
<p>Additionally there are other events that can be listened for:</p>
<blockquote>
<p>The slotchange event is fired on an HTMLSlotElement instance ( element) when the node(s) contained in that slot change.</p>
</blockquote>
<p>See the following:</p><aside class="onebox allowlistedgeneric" data-onebox-src="https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements#custom_element_lifecycle_callbacks">
  <header class="source">
      <img src="https://developer.mozilla.org/favicon.ico" class="site-icon" alt="" width="48" height="48">

      <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements#custom_element_lifecycle_callbacks" target="_blank" rel="noopener nofollow ugc">MDN Web Docs</a>
  </header>

  <article class="onebox-body">
    <img width="690" height="690" src="https://developer.mozilla.org/mdn-social-image.46ac2375.png" class="thumbnail onebox-avatar" alt="">

<h3><a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements#custom_element_lifecycle_callbacks" target="_blank" rel="noopener nofollow ugc">Custom element lifecycle callbacks - Using custom elements - Web APIs | MDN</a></h3>

  <p>Once your custom element is registered, the browser will call certain methods of your class when code in the page interacts with your custom element in certain ways. By providing an implementation of these methods, which the specification calls...</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<aside class="onebox allowlistedgeneric" data-onebox-src="https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/slotchange_event">
  <header class="source">
      <img src="https://developer.mozilla.org/favicon.ico" class="site-icon" alt="" width="48" height="48">

      <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/slotchange_event" target="_blank" rel="noopener nofollow ugc">MDN Web Docs</a>
  </header>

  <article class="onebox-body">
    <img width="690" height="690" src="https://developer.mozilla.org/mdn-social-image.46ac2375.png" class="thumbnail onebox-avatar" alt="">

<h3><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/slotchange_event" target="_blank" rel="noopener nofollow ugc">HTMLSlotElement: slotchange event - Web APIs | MDN</a></h3>

  <p>The slotchange event is fired on an HTMLSlotElement instance ( element) when the node(s) contained in that slot change.</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313739" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/adobe-spectrum-2-web-components-with-liveview/60395/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-313739" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313739"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #21"></div>
  </section>
</div>
    <div class="postbit" id="313742" data-post-id="313742">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="LostKobrakai" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/LostKobrakai/120/3072_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  LostKobrakai
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’m aware of most of them. I’ve played around a bit with webcomponents when they got support to emulate being a form input (which nicely ties in with phoenix’s form handling).</p>
<p>I don’t really want to get to deep into implementation details, but my argument is that an web component being used like e.g. this one: <a href="https://github.com/arkadiuszwojcik/lit-google-map#how-to-use" class="inline-onebox" rel="nofollow">GitHub - arkadiuszwojcik/lit-google-map: This project is port of google-map webcomponent based on LitElement library · GitHub</a> is much more appealing to me than a webcomponent, which takes a bunch of json as input on a random attribute.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313742" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/adobe-spectrum-2-web-components-with-liveview/60395/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-313742" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313742"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #22"></div>
  </section>
</div>
    <div class="postbit" id="313758" data-post-id="313758">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="kokolegorille" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kokolegorille/120/4784_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  kokolegorille
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a href="https://lit.dev/blog/2023-10-10-lit-3.0/" rel="nofollow">Lit 3</a> has been released recently, and with <a href="https://preactjs.com/guide/v10/signals/" rel="nofollow">Signal</a>  it might be even easier to manage state.</p>
<p>You can make a web socket powered component with the use of Phoenix.js</p>
<p>But I find the communication between web components ito be a little bit low level</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313758" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/adobe-spectrum-2-web-components-with-liveview/60395/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-313758" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313758"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #23"></div>
  </section>
</div>
    <div class="postbit" id="313819" data-post-id="313819">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="adw632" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  adw632
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Preact signals. Meh.</p>
<p>At this point I would use Svelte to create web components and get a much nicer DX and cleaner code and less boilerplate.</p>
<pre data-code-wrap="js"><code class="lang-js">&lt;svelte:options customElement="my-element" /&gt;
&lt;script&gt;
	let count = 1;

	// the `$:` means 're-run whenever these values change'
	$: doubled = count * 2;
	$: quadrupled = doubled * 2;

	function handleClick() {
		count += 1;
	}
&lt;/script&gt;

&lt;button on:click={handleClick}&gt;
	Count: {count}
&lt;/button&gt;

&lt;p&gt;{count} * 2 = {doubled}&lt;/p&gt;
&lt;p&gt;{doubled} * 2 = {quadrupled}&lt;/p&gt;
</code></pre>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://svelte.dev/playground/reactive-declarations">
  <header class="source">
      <img src="https://svelte.dev/favicon.png" class="site-icon" alt="" width="128" height="128">

      <a href="https://svelte.dev/playground/reactive-declarations" target="_blank" rel="noopener nofollow ugc">svelte.dev</a>
  </header>

  <article class="onebox-body">
    <img width="640" height="640" src="https://svelte.dev/images/twitter-thumbnail.jpg" class="thumbnail onebox-avatar" alt="">

<h3><a href="https://svelte.dev/playground/reactive-declarations" target="_blank" rel="noopener nofollow ugc">Reactive declarations • Playground • Svelte</a></h3>

  <p>Web development for the rest of us</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>I added the one line directive at the top to make it a custom element. That’s all there is to making a reactive web component with a disappearing framework like Svelte which can be used in any app or framework or regular html page.</p>
<p>I would <em>really</em> like to be able to make my Phoenix components custom elements. This <em>could</em> be achieved by transpiling the Elixir template render and client side event handlers to JS to support both client side and server side rendering of <em>Elixir</em> web components. This would eliminate the need for JS server side rendering and the need for a JS client side framework.</p>
<p>Then as a related but separate concern, use something like LiveState to exchange events and state diffs between the client and server and get full reactivity between client and server, and then with a simple client side state cache and router (literally a few Kb) an Elixir PWA is a slam dunk.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313819" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/adobe-spectrum-2-web-components-with-liveview/60395/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-313819" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313819"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #24"></div>
  </section>
</div>
    <div class="postbit" id="313820" data-post-id="313820">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="kokolegorille" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kokolegorille/120/4784_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  kokolegorille
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>It is not only for preact or react… it’s integrated in Lit 3</p>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://lit.dev/blog/2023-10-10-lit-3.0/#preact-signals-integration">
  <header class="source">
      <img src="https://lit.dev/images/flame-favicon.svg" class="site-icon" alt="" width="160" height="200">

      <a href="https://lit.dev/blog/2023-10-10-lit-3.0/#preact-signals-integration" target="_blank" rel="noopener nofollow" title="12:00AM - 10 October 2023">lit.dev – 10 Oct 23</a>
  </header>

  <article class="onebox-body">
    <div class="aspect-image" style="--aspect-ratio:690/345;"><img src="https://lit.dev/images/logo-whitebg-padded-1600x800.png" class="thumbnail" alt="" width="690" height="345"></div>

<h3><a href="https://lit.dev/blog/2023-10-10-lit-3.0/#preact-signals-integration" target="_blank" rel="noopener nofollow">Preact Signals integration - Lit Launch Day: Lit 3.0, Labs graduations, a...</a></h3>

  <p>We're launching the next major version of Lit</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>Maybe one day You will use some kind of svelte/signal <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313820" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/adobe-spectrum-2-web-components-with-liveview/60395/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-313820" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313820"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #25"></div>
  </section>
</div>
    <div class="postbit" id="313829" data-post-id="313829">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="adw632" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  adw632
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><strong>Again</strong> I don’t really care about preact signals being an integration experiment that Lit supports when Svelte offers a nicer DX and less boilerplate for authoring components.</p>
<p>Svelte has had <a href="https://svelte.dev/blog/svelte-3-rethinking-reactivity" rel="noopener nofollow ugc">compile time reactivity</a> since before V1.0 by analysing the code and use of the <code>$:</code> reactivity statement. Svelte is <strong>compiled</strong> to generate just the code you write with surgical DOM updates vs a typical runtime heavy JS framework. This is why there is practically zero boilerplate code, it’s just html, styles and any JS you <em>have</em> to write to express computations. The compile time reactivity works extremely well but there is always a ways to improve things.</p>
<p>Svelte 5 is moving to its own signals based implementation but this is an <em>implementation detail</em> and not something the developer actually uses directly. Again DX is the focus in Svelte over boilerplate ceremony of other frameworks.</p>
<p>The future of Svelte 5 reactivity is described below:</p>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://svelte.dev/blog/runes">
  <header class="source">
      <img src="https://svelte.dev/favicon.png" class="site-icon" alt="" width="128" height="128">

      <a href="https://svelte.dev/blog/runes" target="_blank" rel="noopener nofollow ugc">svelte.dev</a>
  </header>

  <article class="onebox-body">
    <div class="aspect-image" style="--aspect-ratio:690/362;"><img src="https://svelte.dev/blog/runes/card.png" class="thumbnail" alt="" width="690" height="362"></div>

<h3><a href="https://svelte.dev/blog/runes" target="_blank" rel="noopener nofollow ugc">Introducing runes</a></h3>

  <p>Rethinking ‘rethinking reactivity’</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313829" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/adobe-spectrum-2-web-components-with-liveview/60395/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-313829" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313829"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #26"></div>
  </section>
</div>
    <div class="postbit" id="313837" data-post-id="313837">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Sebb" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Sebb/120/21818_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Sebb
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Great to see that svelte adopts signals!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313837" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/adobe-spectrum-2-web-components-with-liveview/60395/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-313837" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313837"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #27"></div>
  </section>
</div>
    <div class="postbit" id="313896" data-post-id="313896">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Sebb" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Sebb/120/21818_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Sebb
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="adw632" data-post="16" data-topic="60395">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/9d8465/48.png" class="avatar"> adw632:</div>
<blockquote>
<p>Another option I considered was compiling the Svelte <a href="https://www.bits-ui.com/docs/introduction" rel="noopener nofollow ugc">bits-ui </a></p>
</blockquote>
</aside>
<p>Stupid question: How will those components behave as web-components.<br>
In the docs a button is used like this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">&lt;Button.Root
  class="inline-flex h-12 items-center justify-center rounded-input bg-dark
  px-[21px] text-[15px] font-semibold text-background shadow-mini
  hover:bg-dark/95 active:scale-98 active:transition-all"
&gt;
  Click Me
&lt;/Button.Root&gt;
</code></pre>
<p>So its directly styled with tailwind classes. But is this still possible when they are WCs?<br>
Or would I have to create each button-style beforehand (or add some logic to override colors etc)</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313896" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/adobe-spectrum-2-web-components-with-liveview/60395/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-313896" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313896"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #28"></div>
  </section>
</div>
    <div class="postbit" id="313912" data-post-id="313912">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="adw632" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  adw632
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Sebb" data-post="29" data-topic="60395">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sebb/48/21818_2.png" class="avatar"> Sebb:</div>
<blockquote>
<p>So its directly styled with tailwind classes. But is this still possible when they are WCs?<br>
Or would I have to create each button-style beforehand (or add some logic to override colors etc)</p>
</blockquote>
</aside>
<p>Yes. You can style the bits UI components because they provide a class property for the component user. Styling is <a href="https://www.bits-ui.com/docs/styling" rel="noopener nofollow ugc">described here</a>.</p>
<p>The styling in the bits-ui documentation is only example usage. Being headless components they do not do any styling, only interactions and html accessibility.</p>
<p>That’s why shadcn-svelte is literally a copy and paste collection built on bits-ui with a base tailwind theming layer with some design tokens. I would also suggest following the shadcn-svelte approach for default app theming and keep style classes out of component wrapper code. This is especially important in a library, so it allows the theme to be  specified by the user in Twilwind layer and also allows all the tailwind classes on elements where they need.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313912" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/adobe-spectrum-2-web-components-with-liveview/60395/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-313912" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313912"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #29"></div>
  </section>
</div>
    <div class="postbit" id="313934" data-post-id="313934">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dblack" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dblack/120/40394_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dblack
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Interesting conversation! While evaluating Carbon UI, I had a brief look at web components with LiveView a while back.</p>
<p>What’s the browser testing situation for web components like these days (with a tool like Wallaby)? I remember there was a PR in progress to support shadow dom queries in Wallaby: <a href="https://github.com/elixir-wallaby/wallaby/pull/728" class="inline-onebox" rel="noopener nofollow ugc">Shadow dom by superchris · Pull Request #728 · elixir-wallaby/wallaby · GitHub</a>. I’m guessing you’ve implemented something like this locally <a class="mention" href="/u/superchris" rel="nofollow">@superchris</a>? I prefer my tests to not leak implementation details, but I guess there’s no getting away from it… I’m assuming you’d need to do something like querying into the shadow root to say populate a text input that is wrapped by a web component.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313934" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/adobe-spectrum-2-web-components-with-liveview/60395/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-313934" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313934"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #30"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/60395/load_more?page=4">Load more posts (19 remaining)</a>
</div></template></turbo-stream>