Skip to content
sveltekit-embed
Social posts

Threads

A Threads post that resizes to fit its content.

import { Threads } from 'sveltekit-embed';
Svelte
1<Threads post_id="DePOFVxEe_o" />

The post_id is the end of the post’s link. For https://www.threads.com/@threads/post/DePOFVxEe_o it is DePOFVxEe_o.

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 auto themes

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

Svelte
1<Threads theme="dark" post_id="DePOFVxEe_o" />

Props

PropTypeDefault
post_id

The end of the post’s link, e.g. DePOFVxEe_o.

string''
theme

auto follows the visitor’s colour scheme preference.

'light' | 'dark' | 'auto''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.