Today I Learned - Rocky Kev

TIL Web Component two-up

POSTED ON:

TAGS:

Web Components were a big thing for a while, and then it fizzled.
I think there's still a world where it can exist. We just have to find a right way to do it.

Google's Two-up example still holds true as the most pristine example of a world with Web Components.
https://github.com/GoogleChromeLabs/two-up

	<two-up>
<div class="light">
<h1>The Light Side</h1>
</div>
<div class="dark">
<h1>The Dark Side</h1>
</div>
</two-up>
</div>

You import a little web component script that deals with that <two-up> component.

<script src="https://unpkg.com/two-up-element@1"></script>

See the Pen <two-up> (two-up-element) by Jason Miller (@developit) on CodePen.


Related TILs

Tagged:

TIL Web Component two-up

I think there's still a world where it can exist. We just have to find a right way to do it.

TIL Web Component two-up

I think there's still a world where it can exist. We just have to find a right way to do it.

TIL Web Component two-up

I think there's still a world where it can exist. We just have to find a right way to do it.