Skip to content
sveltekit-embed
Social posts

Tweet

A post from X, formerly Twitter.

import { Tweet } from 'sveltekit-embed';
Svelte
1<Tweet
2	tweet_link="adamwathan/status/959078631434731521"
3	theme="dark"
4/>

tweet_link is the username and status from the post’s URL, the part after twitter.com/ or x.com/.

The post is rendered by X’s own script, which is loaded once however many posts are on the page. Until it runs, visitors see the post as a plain link. It does not take a loading prop.

Props

PropTypeDefault
tweet_link

The username and status, e.g. adamwathan/status/959078631434731521.

string''
theme

The colour scheme of the post.

'light' | 'dark''light'

Something wrong on this page? Edit it on GitHub.