Threads
A Threads post that resizes to fit its content.
import { Threads } from 'sveltekit-embed'; 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.
1<Threads theme="dark" post_id="DePOFVxEe_o" />Props
| Prop | Type | Default |
|---|---|---|
post_id The end of the post’s link, e.g. | string | '' |
theme
| '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.