Skip to content

Commit

Permalink
docs: Add a note about img tag in media-poster-image.mdx (#907)
Browse files Browse the repository at this point in the history
This doc change is inspired by the comment by @luwes here:


#904 (comment)

PS: Maintainer edits are allowed. Feel free to change the text as you
see fit.

---------

Co-authored-by: Wesley Luyten <[email protected]>
  • Loading branch information
ADTC and luwes committed Sep 19, 2024
1 parent 92b6bd6 commit fa6ac52
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/src/pages/docs/en/components/media-poster-image.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ For example, you can show a blurhash that mirrors the colors that will appear wi

You can either use the `<media-poster-image>` component as a static image on its own, or, add the `slot="poster"` attribute to associate it with the underlying video element for click-to-play.

> This component is reliant on Javascript to load the poster image. If better control or better performance is desired, you can use `<img slot="poster" src="...">` instead. Set a placeholder via the `background-image` CSS property in the `style` attribute.
## With `src`

<SandpackContainer
Expand Down

0 comments on commit fa6ac52

Please sign in to comment.