Skip to content

Do slots need certain elements? #277

Answered by dylanjha
streamworksaudio asked this question in Q&A
Discussion options

You must be logged in to vote

@streamworksaudio thanks for opening this!

I have a small example here using top-chrome, which seems to be working as expected: https://codesandbox.io/s/media-chrome-slots-wid6nd

The top-chrome slot is pretty un-opinionated as far as applying any default styles, so if you're using a <div> you'll definitely have to give it some of your own styles (which gives you a lot of flexibility).

Depending on what you're after, you might find it handy to use <media-control-bar slot="top-chrome">, the control bar has some default styles applied.

Here's some more docs about using slots, which are admittedly pretty hard to find right now, so I'm guessing you didn't see this: https://github.com/muxinc/me…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@luwes
Comment options

Comment options

You must be logged in to vote
4 replies
@streamworksaudio
Comment options

@dylanjha
Comment options

@streamworksaudio
Comment options

@gkatsev
Comment options

Answer selected by cjpillsbury
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants