A native DOM component wrapper for embedded tweets
Last updated 3 years ago by bret .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install twitter-component 
SYNC missed versions from official npm registry.

twitter-component stability

npm version build status downloads js-standard-style

A native DOM component wrapper for embedded tweets.


// Vanilla JS example
var TwitterComponent = require('twitter-component')

var tweet1 = new TwitterComponent()
var tweet2 = new TwitterComponent()



$ npm install twitter-component


TwitterComponent = require('twitter-component)

Import TwitterComponent component class.

tweet = new TwitterComponent([opts])

Create a new instance of the twitter component. opts is an options objec that can have the following options:

  placeholder: true // Enables placeholder text while loading tweet cards


Returns a div that, when mounted into the page, will be the target of twttr.widgets.createTweet. Mounting the DOM node returned by .render will also load into the page, and any other side-effects and visitor tracking implications that script brings along with it.

Twitter employees: Please release a module version of because this took 5 hours of freetime™ of just trying to get caught up with your ever changing API and widget ecosystem.

Native DOM component model powered by nanocomponent and nanomorph.



Current Tags

  • 1.0.2                                ...           latest (3 years ago)

3 Versions

  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (14)
Dependents (0)

Copyright 2014 - 2016 © |