Skip to content
sveltekit-embed
Code

Gist

A GitHub gist with syntax highlighting.

import { Gist } from 'sveltekit-embed';
Svelte
1<Gist gist_uri="Ennoriel/8c89dc3615292f0a40b04f4f876afd77" />

gist_uri is the username and the gist ID, the part of the gist’s URL after gist.github.com/.

The gist scrolls inside the frame. Set height to show more or less of it.

Svelte
1<Gist
2	gist_uri="Ennoriel/8c89dc3615292f0a40b04f4f876afd77"
3	height="480px"
4/>

Props

PropTypeDefault
gist_uri

The username and gist ID, e.g. Ennoriel/8c89dc….

string''
width

Any CSS width.

string'100%'
height

Any CSS height.

string'320px'
loading

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

'lazy' | 'eager''lazy'
iframe_styles

Inline styles for the iframe. Defaults to the height and width props.

string–

Something wrong on this page? Edit it on GitHub.