Add Twitter posts to your site using your own data.
bun add twitter-componentsAlso works with npm, pnpm, and Yarn.
<twitter-post id="post" theme="dark"></twitter-post>import "twitter-components/register";
const post = document.querySelector("twitter-post");
post.data = {
author: "John Doe",
handle: "john_doe",
url: "https://x.com/john_doe/status/1",
timestamp: "2026-09-13T12:30:00Z",
content: "would you look at that! i can make fake tweets",
stats: { likes: 12480, views: 84947 },
};Use .options for themes, counts, dates, media, and actions. Replace individual regions with slots. Render HTML on the server with renderTwitterPost or renderTwitterTimeline from twitter-components/server.
bun install
bun run check
bun run docs:dev
bun run buildThe same scripts work with npm, pnpm, and Yarn. Run docs:build for the static docs.
This project is licensed under the MIT license. See NOTICE.md for design references used.
Skyra-project's discord-components was a big inspiration for me to create this project.
