Skip to content
sveltekit-embed
Social posts

Bluesky

A Bluesky post that resizes to fit its content.

import { Bluesky } from 'sveltekit-embed';
Svelte
1<Bluesky
2	post_id="did:plc:nlvjelw3dy3pddq7qoglleko/app.bsky.feed.post/3l6ud34tnwn2k"
3/>

On Bluesky, open the post’s menu and choose Embed post. The post_id is the did:plc:… identifier in the code it gives you, without the leading at://.

The embed reports its own height, so the component resizes to fit the post. It loads in its own way and does not take a loading prop.

Dark and system themes

Set theme to dark, or to system to follow the visitor’s preference.

Svelte
1<Bluesky
2	theme="dark"
3	post_id="did:plc:nlvjelw3dy3pddq7qoglleko/app.bsky.feed.post/3l6ud34tnwn2k"
4/>

Props

PropTypeDefault
post_id

The did:plc:…/app.bsky.feed.post/… identifier from the post’s embed option.

string''
theme

system follows the visitor’s colour scheme preference.

'light' | 'dark' | 'system''light'
width

Any CSS width.

string'100%'
iframe_styles

Inline styles for the iframe. Added after the component’s own.

string–

Something wrong on this page? Edit it on GitHub.