Skip to content

A Vue 3 component for embedding tweets in your Vue.js applications.

License

Notifications You must be signed in to change notification settings

Locietta/vue-tweet-pure

Repository files navigation

vue-tweet-pure

npm version TypeScript npm bundle size License

A Vue 3 component for embedding tweets in your Vue.js applications. This is a Vue port of react-tweet.

Features

  • 🚀 Fast loading - SSR-ready, no external scripts or iframes
  • 💪 Native Vue components - no dependency on Twitter's widgets.js
  • 🎨 Customizable - style the tweet component to match your app's design
  • Does NOT require using the Twitter API

Installation

npm install vue-tweet-pure
# or
yarn add vue-tweet-pure
# or
pnpm add vue-tweet-pure

Usage

<script setup>
import { Tweet } from 'vue-tweet-pure'
import 'vue-tweet-pure/style.css' // include default twitter component styles
</script>

<template>
  <Tweet id="1234567890" />
</template>

Defining TwitterComponents to override default components or using vue-tweet-pure/api to build your own tweet component is also possible. I'm not done with the documentation yet, but you can check out the react-tweet documentation for now. The API is almost same.

NOTE: Server component support is not implemented yet.

Development

Contributions are welcome! We're using turbo monorepo to manage the packages. To get started:

  1. Clone the repository
  2. Install dependencies: pnpm i --frozen-lockfile
  3. Start the development server:
    • pnpm dev --filter vue-tweet-pure for basic playground with Vite
    • pnpm dev --filter vitepress-app for more complex example with VitePress, where you can easily toggle light/dark to test the component in different themes

Credits

This package is a Vue 3 port of react-tweet by Vercel. Special thanks to their team for the original implementation and API support.

License

MIT © 2025 Locietta

About

A Vue 3 component for embedding tweets in your Vue.js applications.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •