This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

ngx-twitter
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

ngx-twitter

ngx-twitter is an Angular component library that takes a Twitter tweet ID and uses the Twitter embedded script to embed the tweet in your page. For now, the components are:

  • tweet, which embeds a single tweet in the page
  • tweet-list, which takes a list of IDs and loops over it and embeds each as a tweet component

When the module loads, it loads the https://platform.twitter.com/widgets.js script, and then when it's ready the tweets will be embedded in the page.

When using either tweet or tweet-list, there is an optional options object that can be passed in. The options class has the following attributes:

public cards: string; 		// defaults to 'hidden'
public conversation: string; 	// defaults to 'none'
public theme: string; 		// defaults to 'light'
public linkColor: string; 	// defaults to '#55acee'
public align: string; 		// defaults to 'center'
public lang: string; 		// defaults to 'en'
public width: number; 		// defaults to 325
public dnt: boolean; 		// defaults to true

When the options are passed in to the script to embed the tweet, it looks at each attribute, and if an invalid option value is passed in, it defaults to the above values.

In future releases, Embedded Timelines, Moments, Direct Messages, and others will be implemented as well. If you'd like to contribute, submit an issue or a PR with the desired additions.

Readme

Keywords

Package Sidebar

Install

npm i ngx-twitter

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

62 kB

Total Files

19

Last publish

Collaborators

  • pjlamb12