Props
Name | Description | Type | Default value | Required/Optional |
---|---|---|---|---|
author | Information about the author user of the post | Required | ||
- username | Threads handle of the author | string | Required | |
- image | URL to the profile picture of the author | string | Required | |
- verified | Indicates whether the author is verified | boolean | false | Optional |
text | The text of the post itself | string | Required | |
time | Time of posting. If passed in as a Date object, it will be formatted as it is on Threads | Date | string | Required | |
permalink | The URL for the post (or anything, it's up to you). Clicking the Threads logo or the time of posting on the card will take you to this URL. | string | Optional | |
images | Images in the post | Array<{ src, alt? }> | Optional | |
- src | Source URL for the image | string | Required | |
- alt | Alt description for the image | string | Optional | |
engagement | The number of engagements (replies, reposts, likes) the post has received | { replies?, reposts?, likes? } | Optional | |
- replies | Number of replies | number | 0 | Optional |
- reposts | Number of reposts | number | 0 | Optional |
- likes | Number of likes | number | 0 | Optional |
clickableProfileLink | Creates a clickable visual effect on the name and profile picture of the author. If turned on, clicking these elements will open the user's profile on Threads. | boolean | false | Optional |
showTime | Controls wheter the time of the post should be displayed | boolean | true | Optional |
showEngagement | Controls wheter the engagements of the post should be displayed | boolean | true | Optional |
theme | The theme setting for the card | "light" | "dark" | "light" | Optional |
colors | Gives you the option to override the colors used in the card | { primary, secondary, accent, muted, background, border } | {} | Optional |
gradientBackground | Sets the card's background to gradient | boolean | false | Optional |
blurredBackground | Sets the card's background to blurred | boolean | false | Optional |
Try them out on this playground:
Live Editor
<ThreadsCard className="with-background-image" author={{ username: 'ketchup.jessi', image: 'img/ketchup.jessi.jpg', verified: false, }} text="how do 21 pilots even fit in the cockpit fr" time={new Date('2024-11-09T21:13:00Z')} // try a string instead! permalink="https://www.threads.net/@ketchup.jessi/post/DCKk_pDpwhA" engagement={{ likes: 1300, reposts: 86, replies: 26, }} theme="light" colors={{}} gradientBackground={false} blurredBackground={false} clickableProfileLink={false} showEngagement={true} showTime={true} />
Result
Loading...