<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="312488" data-post-id="312488">
  <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="user20230119" data-post="8" 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/user20230119/48/31375_2.png" class="avatar"> user20230119:</div>
<blockquote>
<p><code>phx-update="ignore"</code> fixes it, but then I cannot add more rows. How do you plan to update the table rows using web components and LV?</p>
</blockquote>
</aside>
<p>I haven’t got to the data tables yet, however for events emitted by components that’s where live-elements comes in, and it also creates function component wrappers so it works with liveview and wires up any specified events.</p>
<p>On the return path for data from the server ultimately we are rendering rows into phoenix component slots which are also mapped to custom element slots by live elements.  I am expecting this will just work also with the newer <a href="https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html#stream/4" rel="noopener nofollow ugc">streams</a> approach.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="312488" 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/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-312488" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="312488"
                     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 #11"></div>
  </section>
</div>
    <div class="postbit" id="313500" data-post-id="313500">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="chrismccord" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/chrismccord/120/24233_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  chrismccord
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Phoenix</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I hadn’t been aware of spectrum before this. Looks great. Is the <a href="https://opensource.adobe.com/spectrum-web-components/index.html" rel="nofollow">current adobe spectrum component docs/explorer</a> spectrum 1 or 2? It’s not clear from the adobe pages whether version 2 release is TDB or already publicly available. First class web components UI libraries with focus on a11y is great and should be able to replace usage of Hooks in many cases.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313500" data-batch-url="/posts/batch_likers">
                        7
                      </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/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-313500" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313500"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-most-liked cat-most-liked" title="One of the top 3 liked posts in this thread!"></div>
  </section>
</div>
    <div class="postbit" id="313529" data-post-id="313529">
  <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>It’s v1.</p>
<p>An easy way to use webcomponents would be a great step forward for LV.<br>
But: it’s not easily done. The work of Chris helps, but its still hard.</p>
<p>The lack of a decent component library is what is keeping us in JS-framework-land for now.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313529" data-batch-url="/posts/batch_likers">
                        2
                      </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/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-313529" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313529"
                     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 #13"></div>
  </section>
</div>
    <div class="postbit" id="313550" data-post-id="313550">
  <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>It’s currently V1. The v2 should be out soon.</p>
<aside class="quote group-Phoenix-Core-Team" data-username="chrismccord" data-post="13" 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/chrismccord/48/24233_2.png" class="avatar"> chrismccord:</div>
<blockquote>
<p>First class web components UI libraries with focus on a11y is great and should be able to replace usage of Hooks in many cases.</p>
</blockquote>
</aside>
<p>Yes I agree. I think web components are the answer to competing with front end frameworks, to the point many front end frameworks are using these capable frameworks like Spectrum and Carbon which bake in a11y.</p>
<p>I got both the Shoelace and Spectrum stuff working but both lacked a few navigation elements and reactive things like sidenav/drawers, which I think is <em>odd</em> because that’s a big part of accessibility and keyboard navigation.</p>
<p>I then moved onto integating the Carbon Design System V11 web components into my asset pipeline which does deal with these concerns.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313550" 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/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-313550" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313550"
                     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 #14"></div>
  </section>
</div>
    <div class="postbit" id="313552" data-post-id="313552">
  <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="14" 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>The lack of a decent component library is what is keeping us in JS-framework-land for now.</p>
</blockquote>
</aside>
<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> as a very clean set of unstyled, headless accessibility focused custom elements which has extremely minimal dependencies as it’s built on the melt-ui component builder by the same authors (which was inspired from working with Radix UI).</p>
<p>Bits UI is used and themed in <a href="https://www.shadcn-svelte.com/" rel="noopener nofollow ugc">shadcn-svelte</a> using tailwind and is basically just a copy paste component collection built using bits-UI with some default base layer theming and a handful of color tokens.</p>
<p>I still might do this as an experiment to see what the snags are.</p>
<p>So I believe a really nice headless UI system based on custom elements <em>is</em> within reach. It’s more or less just a re-packaging of bits UI as custom elements using the svelte <a href="https://svelte.dev/docs/custom-elements-api" rel="noopener nofollow ugc">compilation flag</a> to emit custom elements.</p>
<p>That could serve as the minimal headless UI foundation for Phoenix, and also align nicely with the current use of tailwind also (the bits UI component examples show the element structure and the code examples show use of tailwind classes for example styling).</p>
<p>I would suggest adopting a base theming layer and some design tokens very much as shadcn-svelte has done as a theme engine for Pheonix.</p>
<p>Then add in the custom element event helper for wiring events back to liveview and it’s getting tantilisingly close.</p>
<p>The next step beyond this would be a much larger step,  to make custom elements a first class engine of how “LiveView V2” works as a possible future.</p>
<p>This would require Phoenix to render the elements into a declarative shadow dom template on first render.(sounds complex but it’s literally just adding a template tag) so that we get server side rendered custom elements without any JS/node. We could literally beat the JS frameworks on this.</p>
<p>The other half is to generate a custom element and transpile the render function to JS, which gets shipped to the client as a custom element. Hologram already has a nice Elixir to JS transpiler. The html should include any client side scripts and styles. A good example would be callbacks for client side reactivity, keyboard and navigation events etc.</p>
<p>Liveview interaction with the client would then become more like LiveState and just exchange delta state and events over a Phoenix channel, so rather than pushing html / Dom patching,  it’s pushing state patches, and the custom elements emit events that are forwarded to the server and handled just like they currently are (basically what is done in LiveState).</p>
<p>Why do all that?</p>
<ul>
<li>Well you can embed Phoenix  components in other applications just by adding some published custom elements from your app to a page anywhere.</li>
<li>It can also allow a pathway to LiveView SPA’s using a wrapper with a simple reactive state cache.</li>
</ul> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313552" 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/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-313552" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313552"
                     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 #15"></div>
  </section>
</div>
    <div class="postbit" id="313559" data-post-id="313559">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="chrismccord" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/chrismccord/120/24233_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  chrismccord
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Phoenix</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group quote-modified" data-username="Sebb" data-post="14" 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>An easy way to use webcomponents would be a great step forward for LV<br>
But: it’s not easily done. The work of Chris helps, but its still hard.</p>
</blockquote>
</aside>
<p>Can you expand where LiveView falls short here? webcomponents/custom elements by their nature are “just tags” so the LiveView integration story vs where you’d use a hook today works just fine. For example, here’s the LiveBeats Flash hook vs Flash web component:</p>
<pre data-code-wrap="javascript"><code class="lang-javascript">// &lt;div phx-hook="Flash"&gt; ...
Hooks.Flash = {
  mounted(){
    let hide = () =&gt; liveSocket.execJS(this.el, this.el.getAttribute("phx-click"))
    this.timer = setTimeout(() =&gt; hide(), 8000)
    this.el.addEventListener("phx:hide-start", () =&gt; clearTimeout(this.timer))
    this.el.addEventListener("mouseover", () =&gt; {
      clearTimeout(this.timer)
      this.timer = setTimeout(() =&gt; hide(), 8000)
    })
  },
  destroyed(){ clearTimeout(this.timer) }
}

// vs
// &lt;lb-flash&gt; ...
class Flash extends HTMLElement {
  connectedCallback(){
    let hide = () =&gt; liveSocket.execJS(this, this.getAttribute("phx-click"))
    this.timer = setTimeout(() =&gt; hide(), 8000)
    this.addEventListener("phx:hide-start", () =&gt; clearTimeout(this.timer))
    this.addEventListener("mouseover", () =&gt; {
      clearTimeout(this.timer)
      this.timer = setTimeout(() =&gt; hide(), 8000)
    })
  }
  disconnectedCallback(){ clearTimeout(this.timer) }
}

customElements.define('lb-flash', Flash);
</code></pre>
<p>WC can get more complex when shadowdom comes into play, but then it’s also a nice segregation from LV DOM patching so you can get around the phx-update=ignore steps. Having this available in a LV collocated/same file way would be great, but what roadblocks exist for you where WC + LV is not “easy to use” ?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313559" 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/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-313559" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313559"
                     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 #16"></div>
  </section>
</div>
    <div class="postbit" id="313600" data-post-id="313600">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group">
<blockquote>
<p>WC can get more complex when shadowdom comes into play, but then it’s also a nice segregation from LV DOM patching so you can get around the phx-update=ignore steps. Having this available in a LV collocated/same file way would be great, but what roadblocks exist for you where WC + LV is not “easy to use” ?</p>
</blockquote>
</aside>
<p>The main things I found “not easy to use” with LV/WC integration were:</p>
<ul>
<li>sending complex data in required json serialization</li>
<li>handling custom events in LV required a hook</li>
</ul>
<p>All of these are certainly possible to do yourself, it just gets a bit tedious IMHO, which is my I created <a href="https://github.com/launchscout/live_elements" rel="noopener nofollow ugc">live_elements</a>. It uses macros to make custom elements work just like LV functional components.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313600" data-batch-url="/posts/batch_likers">
                        2
                      </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/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-313600" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313600"
                     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 #17"></div>
  </section>
</div>
    <div class="postbit" id="313601" data-post-id="313601">
  <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="superchris" data-post="18" 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/superchris/48/23484_2.png" class="avatar"> superchris:</div>
<blockquote>
<p>All of these are certainly possible to do yourself, it just gets a bit tedious IMHO, which is my I created <a href="https://github.com/launchscout/live_elements" rel="noopener nofollow ugc">live_elements </a>. It uses macros to make custom elements work just like LV functional components.</p>
</blockquote>
</aside>
<p>Agree. Ive been using it <img src="https://forum.elixirforum.com/images/emoji/apple/laughing.png?v=15" title=":laughing:" class="emoji" alt=":laughing:" loading="lazy" width="20" height="20"></p>
<p>I will raise a couple of PRs for live elements when I’m back to the office which handle some edge cases.</p>
<p>I’m also planning to automate the CEM generation with a watcher as part of my build pipeline, which might result in a documention PR.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313601" 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/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-313601" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313601"
                     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 #18"></div>
  </section>
</div>
    <div class="postbit" id="313727" data-post-id="313727">
  <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 group-Phoenix-Core-Team" data-username="chrismccord" data-post="17" 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/chrismccord/48/24233_2.png" class="avatar"> chrismccord:</div>
<blockquote>
<p>Can you expand where LiveView falls short here? webcomponents/custom elements by their nature are “just tags” so the LiveView integration story vs where you’d use a hook today works just fine.</p>
</blockquote>
</aside>
<p>That’s only true for “dumb” components that get all information they need from the tag-structure. But when they have some methods or emit events it’s another story. And it’s beyond me.</p>
<p><span class="mention">@andrewh</span> will hopefully soon share his findings, so we get a picture what really needs to be done.</p>
<aside class="quote no-group" data-username="andrewh" data-post="16" data-topic="60395">
<div class="title">
<div class="quote-controls"></div>
 andrewh:</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> as a very clean set of unstyled, headless accessibility focused custom elements</p>
</blockquote>
</aside>
<p>This looks promising. Complete, headless, tailwind-stylable web-components with decent a11y and a painless LV-wrapper would be the perfect solution.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313727" 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/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-313727" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313727"
                     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 #19"></div>
  </section>
</div>
    <div class="postbit" id="313731" data-post-id="313731">
  <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">
								<aside class="quote no-group" data-username="Sebb" data-post="20" 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>That’s only true for “dumb” components that get all information they need from the tag-structure. But when they have some methods or emit events it’s another story. And it’s beyond me.</p>
</blockquote>
</aside>
<p>I’m always on the edge about this one. Imo web components would do better by working more with the dom. That should actually simplify their usage (mapping to standard html essentially), but it certainly isn’t as simple from the web component implementers pov. Though really you’d need to regularly check attributes for changes just as much as you’d need to check nested markup.</p>
<p>The reason why we didn’t do that much in the past is because that required shipping a compiler to runtime (see early days of vuejs, where people did that for a short time). But with web components being a standard we don’t need to treat innerHTML as useless for passing in data.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="313731" 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/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-313731" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="313731"
                     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 #20"></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=3">Load more posts (29 remaining)</a>
</div></template></turbo-stream>