deco-spoiler-tag
v1.0.1
Published
Spoiler Tag Web Component in Tram-Deco
Downloads
1
Readme
deco-spoiler-tag
Spoiler Tag Web Component written in Tram-Deco
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>