Usage
Embed videos from any source that supports iframe embedding.
YouTube and Vimeo URLs are automatically converted to their embed format, so you can paste a share link directly. For other providers, pass in a valid embed URL.
You can add a poster image to show a thumbnail before playback, adjust the aspect ratio, and customize the appearance with component props.

::video
---
src: "https://www.youtube.com/watch?v=1NSwNjzbCSs"
poster: "/images/examples/video-poster-kongair.png"
play-button: true
aspect-ratio: "16:9"
title: "Kong Developer Portal Demo"
border-radius: "6px"
width: "100%"
padding: "0"
margin: "0"
---
::
Props
src
The URL of the video to embed. YouTube and Vimeo URLs are automatically converted to their embed format, so you can use any of the following:
- YouTube:
youtube.com/watch?v=ID,youtu.be/ID,youtube.com/shorts/ID,youtube.com/live/ID, oryoutube.com/embed/ID - Vimeo:
vimeo.com/IDorplayer.vimeo.com/video/ID - Other providers: Pass a valid iframe embed URL directly
- Type:
string - Default:
'' - Required:
true
poster
The full URL of a poster/thumbnail image displayed before the video plays. Clicking the poster starts the video.
- Type:
string - Default:
''
playButton
Whether to show a play button overlay on the poster image to indicate the content is playable. Defaults to true when poster is set for better user experience, but can be disabled if desired.
- Type:
boolean - Default:
true
aspectRatio
The aspect ratio of the video player.
- Type:
'16:9' | '4:3' | '1:1' | '21:9' - Default:
16:9
::video
---
aspect-ratio: "4:3"
src: "https://www.youtube.com/watch?v=1NSwNjzbCSs"
title: "Aspect Ratio Demo"
border-radius: "6px"
width: "100%"
max-width: "100%"
padding: "0"
margin: "0"
---
::
title
The title attribute for the iframe, used for accessibility.
- Type:
string - Default:
''
Shared Props
This component also includes the shared props listed below:
border- default isvar(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea)borderRadius- default isvar(--kui-border-radius-30, 6px)margin- default isvar(--kui-space-0, 0)maxWidth- default is100%padding- default isvar(--kui-space-0, 0)width- default is100%styles- default is''