Font Awesome Build Awesome
Try SSR Server-side rendering (SSR) generates component HTML on the server before the page loads, improving SEO and initial load time. Use the switch to see Web Awesome components render with and without SSR.
Search this website ⌘KCtrl+K Light Dark System Docs Select Color Scheme Default Awesome Shoelace Active Brutalist Glossy Matter Mellow Playful Premium Tailspin Docs Select Theme View Project on GitHub Star Project on GitHub
Start Components Docs Help
Login Log into your account
Web Awesome Font Awesome Build Awesome
Search this site… /
Try SSR Server-side rendering (SSR) generates component HTML on the server before the page loads, improving SEO and initial load time. Use the switch to see Web Awesome components render with and without SSR.
Light Dark System Docs Select Color Scheme Default Awesome Shoelace Active Brutalist Glossy Matter Mellow Playful Premium Tailspin Docs Select Theme

Getting Started

  • Installation
  • Usage
  • Forms
  • Localization
  • Frameworks
  • Using with AI
  • Figma Design Kit ProThis requires access to Web Awesome Pro
  • Server Rendering

Resources

  • Accessibility
  • Browser Support
  • Contributing
  • Patterns ProPatterns require access to Web Awesome Pro
  • Migrating from Shoelace
  • Visual Tests
  • Changelog
  • Help & Support

Theming & Utilities

  • Overview
  • Built-in Themes
  • Color Palettes
  • Design Tokens
  • Customizing & Theming
  • CSS Utilities

Actions

  • Button
  • Button Group
  • Copy Button
  • Dropdown
    • Dropdown Item

Forms

  • Checkbox
  • Checkbox Group
  • Color Picker
  • Combobox ProThis requires access to Web Awesome Pro
  • Date Input ProThis requires access to Web Awesome Pro
  • Date Picker ProThis requires access to Web Awesome Pro
  • File Input ProThis requires access to Web Awesome Pro
  • Input
  • Known Date
  • Number Input
  • OTP Input
  • Radio Group
    • Radio
  • Rating
  • Select
    • Option
  • Slider
  • Switch
  • Textarea
  • Time Input

Layout

  • Accordion
    • Accordion Item
  • Card
  • Details
  • Dialog
  • Divider
  • Drawer
  • Page
  • Scroller
  • Split Panel

Navigation

  • Breadcrumb
    • Breadcrumb Item
  • Pagination
  • Tab Group
    • Tab
    • Tab Panel
  • Tree
    • Tree Item

Feedback

  • Badge
  • Callout
  • Progress Bar
  • Progress Ring
  • Skeleton
  • Spinner
  • Tag
  • Toast
    • Toast Item
  • Tooltip

Media

  • Animated Image
  • Avatar
  • Carousel
    • Carousel Item
  • Comparison
  • Icon
  • Markdown
  • QR Code
  • Video ProThis requires access to Web Awesome Pro
  • Video Playlist ProThis requires access to Web Awesome Pro
  • Zoomable Frame

Data Viz ProThis requires access to Web Awesome Pro

  • Bar Chart
  • Bubble Chart
  • Data Grid
  • Doughnut Chart
  • Line Chart
  • Pie Chart
  • Polar Area Chart
  • Radar Chart
  • Scatter Chart
  • Sparkline
  • Advanced Usage

Helpers

  • Animation
  • Format Bytes
  • Format Date
  • Format Number
  • Include
  • Intersection Observer
  • Mutation Observer
  • Popover
  • Popup
  • Random Content
  • Relative Time
  • Resize Observer

Video

  • Examples
  • Adding Video Sources
  • Controls
  • Poster Image
  • Captions & Subtitles
  • Icon Slots
  • Playlists
  • Video Recommendations
  • Video Encoding
  • Poster Images
  • Caption Files
  • API
  • Importing
  • Slots
  • Attributes & Properties
  • Methods
  • Events
  • CSS Custom Properties
  • CSS Parts
  • Dependencies
On This Page...
  • Examples
  • Adding Video Sources
  • Controls
  • Poster Image
  • Captions & Subtitles
  • Icon Slots
  • Playlists
  • Video Recommendations
  • Video Encoding
  • Poster Images
  • Caption Files
  • API
  • Importing
  • Slots
  • Attributes & Properties
  • Methods
  • Events
  • CSS Custom Properties
  • CSS Parts
  • Dependencies

Video

<wa-video>
ProIncluded with Web Awesome Pro Experimental Media Since 3.7

Videos are used to embed and play video content with custom controls and captions.

Get Video with Web Awesome Pro! Subscribing to Web Awesome Pro gives you every Pro component, plus premium themes, color tools, team collaboration, and more.
  • Pro Components
  • Native Styles
  • CSS + Layout Utilities
  • 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
Get Web Awesome Pro + Video!

Already have Pro? Log in

<wa-video title="Web Awesome" controls="full">
  <source src="https://uploads.webawesome.com/waks_compressed.mp4" type="video/mp4" />
</wa-video>

Examples

Link to This Section

Adding Video Sources

Link to This Section

The simplest way to add a video is with the src attribute.

<wa-video
  src="https://uploads.webawesome.com/01-create-your-first-kit.mp4"
  title="Creating a Font Awesome Kit"
  poster="/assets/images/fa-part-1.jpg"
></wa-video>

For multiple formats or additional options, use <source> elements instead.

<wa-video title="Creating a Font Awesome Kit" poster="/assets/images/fa-part-1.jpg">
  <source src="https://uploads.webawesome.com/01-create-your-first-kit.mp4" type="video/mp4" />
  <source src="https://uploads.webawesome.com/01-create-your-first-kit.ogv" type="video/ogg" />
  <source src="https://uploads.webawesome.com/01-create-your-first-kit.webm" type="video/webm" />
</wa-video>

Controls

Link to This Section

Use the controls attribute to choose which playback controls appear. Switch presets below to compare them.

Preset Shows
standard default Playback, a seekable timeline, elapsed and total time, volume, captions, and fullscreen
full Everything in standard, plus playback speed and picture-in-picture
none No controls — the video still plays programmatically, and the poster overlay and captions stay visible
standard full none
<div class="video-controls-demo">
  <wa-video controls="standard" title="Using Kits in Your Project" poster="/assets/images/fa-part-2.jpg">
    <source src="https://uploads.webawesome.com/02-using-kits-in-your-project.mp4" type="video/mp4" />
    <track
      src="https://uploads.webawesome.com/02-using-kits-in-your-project.vtt"
      kind="subtitles"
      srclang="en"
      label="English"
    />
  </wa-video>

  <wa-divider></wa-divider>

  <wa-radio-group label="Controls" value="standard" orientation="horizontal">
    <wa-radio appearance="button" value="standard">standard</wa-radio>
    <wa-radio appearance="button" value="full">full</wa-radio>
    <wa-radio appearance="button" value="none">none</wa-radio>
  </wa-radio-group>
</div>

<script>
  const demo = document.querySelector('.video-controls-demo');
  const video = demo.querySelector('wa-video');
  const radioGroup = demo.querySelector('wa-radio-group');

  radioGroup.addEventListener('change', () => {
    video.controls = radioGroup.value;
  });
</script>

Poster Image

Link to This Section

Add a poster image that displays before the video plays. If no poster is provided, no overlay is shown and the browser will display the first frame of the video instead.

<wa-video title="Using Teams" poster="/assets/images/teams.jpg" controls="full">
  <source
    src="https://uploads.webawesome.com/Doing%20More%20with%20FA%20Ep.%202%20'Using%20Teams'.mp4"
    type="video/mp4"
  />
</wa-video>

Captions & Subtitles

Link to This Section

Add a <track> element to enable captions using standard WebVTT files.

<wa-video controls="standard" title="Creating a Font Awesome Kit" poster="/assets/images/fa-part-1.jpg">
  <source src="https://uploads.webawesome.com/01-create-your-first-kit.mp4" type="video/mp4" />
  <track
    src="https://uploads.webawesome.com/01-create-your-first-kit.vtt"
    kind="subtitles"
    srclang="en"
    label="English"
  />
</wa-video>

Captions are rendered above the video controls and automatically adjust position when controls show or hide.

Icon Slots

Link to This Section

Every control's icon has a slot — poster-icon, play-icon, pause-icon, volume-icon, mute-icon, fullscreen-icon, and exit-fullscreen-icon — so you can supply your own. This example swaps the poster, play, and pause icons.

<wa-video title="Using Teams" poster="/assets/images/teams.jpg" controls="full">
  <wa-icon slot="poster-icon" name="film"></wa-icon>
  <wa-icon slot="play-icon" name="circle-play"></wa-icon>
  <wa-icon slot="pause-icon" name="circle-pause"></wa-icon>
  <source
    src="https://uploads.webawesome.com/Doing%20More%20with%20FA%20Ep.%202%20'Using%20Teams'.mp4"
    type="video/mp4"
  />
</wa-video>

Playlists

Link to This Section

Group a series of related videos into <wa-video-playlist> to play them in sequence with built-in navigation.

Video Recommendations

Link to This Section

Recommended to ensure fast loading, broad browser compatibility, and the best playback experience across devices.

Video Encoding

Link to This Section
Setting Recommended Reason
Codec H.264 (MP4) Broadest browser and device support
Resolution 1280×720 (720p) Good balance of quality and file size
Frame rate 24–30fps Smooth motion without excess data
Bitrate 2–5 megabits/s Good quality at 720p without buffering

Poster Images

Link to This Section
Setting Recommended Reason
Format JPEG (80–85%) or WebP Small file size with wide browser support
File size Under 200KB Fast initial load before video starts
Aspect ratio 16:9 Matches standard video dimensions
Resolution Match video exactly Prevents layout shift on load

Caption Files

Link to This Section
Setting Recommended Reason
Format WebVTT (.vtt) Only format supported by the HTML <track> element
Encoding UTF-8 Ensures special characters and non-Latin scripts render correctly
Timing Frame accurate Prevents captions from appearing early or late

API

Link to This Section

Importing

Link to This Section

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.

CDN npm Self-Hosted React

Import this component directly from the CDN:

import 'https://ka-f.webawesome.com/[email protected]/components/video/video.js';

After installing Web Awesome via npm, import this component:

import '@awesome.me/webawesome/dist/components/video/video.js';

If you're self-hosting Web Awesome, import this component from your server:

import './webawesome/dist/components/video/video.js';

To import this component for React 18 or below, use the following code:

import WaVideo from '@awesome.me/webawesome/dist/react/video/index.js';

Slots

Link to This Section

Learn more about using slots.

Name Description
(default) The default slot. Place <source> and <track> elements for a single video. Alternatively, use the src attribute for a single source.
controls-after-play Content inserted immediately after the play/pause button. Used by <wa-video-playlist> to inject the next button.
controls-start Content inserted at the start of the controls bar (before play/pause). Used by <wa-video-playlist> to inject the prev button.
exit-fullscreen-icon Icon shown on the fullscreen button when in fullscreen.
fullscreen-icon Icon shown on the fullscreen button when not in fullscreen.
mute-icon Icon shown on the volume/mute button when muted or volume is 0.
pause-icon Icon shown on the play/pause button when playing.
play-icon Icon shown on the play/pause button when paused.
poster-icon Icon shown on the poster play button. Defaults to a play-circle icon.
volume-icon Icon shown on the volume/mute button when audio is active.

Attributes & Properties

Link to This Section

Learn more about attributes and properties.

Name Description Reflects
autoplay
autoplay
Enables autoplay when the component connects.
Type boolean
Default false
autoplayMuted
autoplay-muted
Enables autoplay in a muted state.
Type boolean
Default false
autoplayOnVisible
autoplay-on-visible
Automatically resumes playback when the player scrolls back into view after being paused by scrolling out.
Type boolean
Default false
controls
controls
The video's controls preset. - none — no controls are shown. - standard — shows the timeline, play/pause, volume, captions, and fullscreen. - full — all of the above plus playback speed and picture-in-picture.
Type 'none' | 'standard' | 'full'
Default 'standard'
currentTime
currentTime
The current playback position in seconds.
Type number
Default 0
duration
duration
The total duration of the video in seconds.
Type number
Default 0
iconLibrary
icon-library
Icon library used for all built-in control icons. Defaults to 'system'.
Type string
Default 'system'
loop
loop
Loops the video when playback ends.
Type boolean
Default false
muted
muted
When set, the video will be muted.
Type boolean
Default false
playing
playing
Indicates whether the video is currently playing.
Type boolean
Default false
poster
poster
Poster image URL
Type string
Default ''
preload
preload
Controls how the browser preloads the video. Defaults to 'metadata' to minimize data usage.
Type 'auto' | 'metadata' | 'none'
Default 'metadata'
src
src
The URL of the video source. For multiple formats, use <source> elements instead.
Type string
Default ''
thumbnails
thumbnails
A URL pointing to a WebVTT file for timeline thumbnail previews.
Type string
Default ''
title
title
The video's title.
Type string
Default ''
volume
volume
The video's volume.
Type number
Default 1

Methods

Link to This Section

Learn more about methods.

Name Description Arguments
exitFullscreen() Exits fullscreen mode.
getState() Gets the current playback state.
getVideoElement() Gets the native video element.
pause() Pauses playback.
play() Starts playback.
requestFullscreen() Enters fullscreen mode.
seek() Seeks to a specific time in the video. time: number
setPlaybackRate() Sets the playback rate (speed). rate: number
setVolume() Sets the volume level. volume: number
toggleMute() Toggles the muted state.
togglePlay() Toggles between play and pause.

Events

Link to This Section

Learn more about events.

Name Description
ended Emitted when playback ends.
error Emitted when an error occurs while loading/playing.
loadedmetadata Emitted when metadata has been loaded.
pause Emitted when playback stops.
play Emitted when playback begins.
timeupdate Emitted when the time changes.
volumechange Emitted when the volume changes.

CSS Custom Properties

Link to This Section

Learn more about CSS custom properties.

Name Description
--controls-background
The background of the controls bar and mobile controls.
Default var(--wa-color-surface-default)
--controls-color
The text and icon color used throughout the controls overlay, title overlay, and mobile controls.
Default white
--poster-play-button-background
The background of the play button shown over the poster image. Also used to derive the hover state via color-mix().
Default var(--wa-color-surface-default)

CSS Parts

Link to This Section

Learn more about CSS parts.

Name Description CSS selector
caption The caption text element. ::part(caption)
caption-overlay The custom caption overlay container. ::part(caption-overlay)
controls The controls container. ::part(controls)
controls-overlay The overlay wrapping timeline and controls bar. ::part(controls-overlay)
poster-overlay The poster image overlay. ::part(poster-overlay)
poster-play-button The play button on the poster overlay. ::part(poster-play-button)
thumbnail The thumbnail preview. ::part(thumbnail)
timeline The timeline/scrubber container. ::part(timeline)
timeline-indicator The timeline slider's filled indicator (forwarded from wa-slider). ::part(timeline-indicator)
timeline-thumb The timeline slider's thumb (forwarded from wa-slider). ::part(timeline-thumb)
timeline-track The timeline slider's track (forwarded from wa-slider). ::part(timeline-track)
video The video element. ::part(video)
video-title-overlay The title text overlay. ::part(video-title-overlay)
video-wrapper The component's outer wrapper. ::part(video-wrapper)
base Deprecated. Use the video-wrapper part instead. ::part(base)

Dependencies

Link to This Section

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>
Need a hand? Report a bug Ask for help
Go Make Something Awesome
Version 3.12.0 © Fonticons, Inc.
  • Terms
  • Privacy
  • Refunds
  • Core License
  • Pro License

Quick Links

  • Components
  • CSS Utilities
  • Theming
  • Using with AI
  • Changelog
  • Help & Support

Recent Searches

    D'oh! No results for “”

    Suggest on GitHub Ask on Discord
    Navigate Select
    Close Esc

    We Have Cookies…

    We use cookies to make webawesome.com work better by storing limited information about your usage.

    We value your privacy, so we won't use them for evil or ask you to join the dark side.

    Customize
    Necessary Only Accept All
    Strictly Necessary
    Required to make the site function correctly — cannot be turned off
    Functionality Analytics
    Cancel Confirm Cookie Choices