1.0.1 • Published 1 year ago

deco-spoiler-tag v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

deco-spoiler-tag

Spoiler Tag Web Component written in Tram-Deco

text "Thorn shouts to the surrounding crowd," and then there is black bar where there should be text

Live Example on Codepen

How to use

<script src="https://unpkg.com/deco-spoiler-tag@1"></script>

<p>
  Thorn shouts to the surrounding crowd,
  <spoiler-tag>"Soylent Green is people!"</spoiler-tag>
</p>

API

The component takes in a single slot, which is the hidden content.

You can style the control for the spoiler using ::part(control)::after.

<style>
  spoiler-tag::part(control)::after {
    background: green;
    color: green;
  }
</style>
1.0.1

1 year ago

1.0.0

1 year ago