video
A Youtube or Vimeo video embed
Preview
![](https://v39.getkirby.com/media/pages/docs/reference/panel/blocks/video/2f6c80637e-1704284774/video-960x.png)
Default files
Snippet
<?php
use Kirby\Cms\Html;
/** @var \Kirby\Cms\Block $block */
?>
<?php if ($video = Html::video($block->url())): ?>
<figure>
<?= $video ?>
<?php if ($block->caption()->isNotEmpty()): ?>
<figcaption><?= $block->caption() ?></figcaption>
<?php endif ?>
</figure>
<?php endif ?>
To overwrite this default snippet, place your custom file in /site/snippets/blocks/video.php
.
Blueprint
name: field.blocks.video.name
icon: video
preview: video
fields:
url:
label: field.blocks.video.url.label
type: url
placeholder: field.blocks.video.url.placeholder
caption:
label: field.blocks.video.caption
type: writer
inline: true
To overwrite this default blueprint, place your custom file in /site/blueprints/blocks/video.yml
.
Vue component
kirby/blob/main/panel/src/components/Forms/Blocks/Types/Video.vue