Skip to content
sveltekit-embed
Video

Vimeo

A Vimeo video at any aspect ratio.

import { Vimeo } from 'sveltekit-embed';
Svelte
1<Vimeo vimeo_id="246846978" />

vimeo_id is the number at the end of the video’s URL.

Aspect ratio and start time

The player keeps a 16:9 shape at any width. Change it with aspect_ratio, and start part way through with skip_to.

Svelte
1<Vimeo
2	vimeo_id="246846978"
3	aspect_ratio="4:3"
4	skip_to={{ m: 1, s: 30 }}
5/>

Props

PropTypeDefault
vimeo_id

The number at the end of the video’s URL.

string''
autoplay

Start playing as soon as it loads.

booleanfalse
aspect_ratio

Width to height, e.g. 4:3 or 9:16.

string'16:9'
skip_to

Where to start playing from.

{ h?: number; m?: number; s?: number }{ h: 0, m: 0, s: 0 }
loading

lazy waits until the embed is near the viewport, eager loads it straight away.

'lazy' | 'eager''lazy'

Something wrong on this page? Edit it on GitHub.