Video Playlist
Video playlists wrap multiple <wa-video> elements into a playlist with navigation controls.
-
Pro Components -
Responsive Layout Tools -
Ever-Growing Pattern Library -
Unlimited Hosted Projects -
Pre-Built Pro Themes -
Pro Theme Builder -
Pro Color Tools -
Official Figma Design Kit -
WA Pro Perpetual License -
Actual Human™ Support
Examples
Controls Preset
Use the controls attribute to set the controls preset for all videos in the playlist. Accepts the same values as <wa-video>: none, standard, or full (default).
Navigating Programmatically
Use the next(), previous(), and goTo(index) methods to navigate between videos programmatically.
Listening for Changes
The wa-video-change event fires when the active video changes, providing the previous index, current index, and the incoming video's metadata.
Importing
If you're using the autoloader or a hosted project, components load on demand — no manual import needed. To cherry-pick a component manually, use one of the following snippets.
Import this component directly from the CDN:
import 'https://ka-f.webawesome.com/[email protected]/components/video-playlist/video-playlist.js';
After installing Web Awesome via npm, import this component:
import '@awesome.me/webawesome/dist/components/video-playlist/video-playlist.js';
If you're self-hosting Web Awesome, import this component from your server:
import './webawesome/dist/components/video-playlist/video-playlist.js';
To import this component for React 18 or below, use the following code:
import WaVideoPlaylist from '@awesome.me/webawesome/dist/react/video-playlist/index.js';
Slots
Learn more about using slots.
| Name | Description |
|---|---|
| (default) | The default slot. Place <wa-video> elements to create a playlist. |
Attributes & Properties
Learn more about attributes and properties.
| Name | Description | Reflects | |
|---|---|---|---|
controlscontrols |
The controls preset forwarded to each child
<wa-video>.
Type
'none' | 'standard' | 'full'
Default
'full'
|
|
|
iconLibraryicon-library |
Icon library used for placeholder icons.
Type
string
Default
'system'
|
Methods
Learn more about methods.
| Name | Description | Arguments |
|---|---|---|
goTo() |
Jumps to the video at the given index. |
index: number
|
next() |
Plays the next video in the playlist. | |
previous() |
Plays the previous video in the playlist. |
Events
Learn more about events.
| Name | Description |
|---|---|
wa-video-change |
Emitted when the active video changes. |
CSS parts
Learn more about CSS parts.
| Name | Description | CSS selector |
|---|---|---|
base |
The component's base wrapper. |
::part(base)
|
playlist |
The playlist sidebar container. |
::part(playlist)
|
playlist-duration |
The duration text within a playlist item. |
::part(playlist-duration)
|
playlist-item |
An individual playlist item button. |
::part(playlist-item)
|
playlist-thumbnail |
The thumbnail image within a playlist item. |
::part(playlist-thumbnail)
|
playlist-title |
The title text within a playlist item. |
::part(playlist-title)
|
Dependencies
This component automatically imports the following elements. Sub-dependencies, if any exist, will also be included in this list.
<wa-button><wa-dropdown><wa-dropdown-item><wa-icon><wa-popover><wa-popup><wa-slider><wa-spinner><wa-tooltip><wa-video>