This is Twitter like image viewer Web Components.
Sample: https://hikiroom.github.io/twitter-like-image/sample/
Download code here
$ npm install twitter-like-image
<style>
tl-img::part(container) {
width: 200px;
}
</style>
<tl-img
src="
https://placehold.jp/150x150.png,
https://placehold.jp/200x150.png,
https://placehold.jp/250x150.png,
https://placehold.jp/300x150.png
"
alt="
alt1,
alt2,
alt3,
alt4
"
></tl-img>
src and alt attribute can be set from 1 to 4.
Name | Description |
---|---|
container |
container element that includes all child elements. |