Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
May 1, 2020 11:45 am GMT

Instagram Widget: My First WebComponent

Hi!
I am trying to create my own opensource collection of webcomponents. I started by creating an instagram widget: it shows the latest photos of your profile.

The idea is to create an ecosystem of web components to replace heavy wordpress plugins or to have (the same) components that also work on react, angular and vuejs.

Resources: [DEMO] [NPM] [GITHUB]

Webcomponents are the future for me. They allow you to replace wordpress plugins, iframe, invasive javascript libraries. Webcomponents are native components that we also have on react or angular but with better optimized by browsers.

Features

  • [] Easy to use
  • [] MIT License
  • [] Work with: Browserify / Webpack / ReactJS / Angular / Wordpress
  • [] Translations: (Help me )

Screenshot

Photos from @ptkdev instagram account:
WebComponent: InstagramWidget

Installation (Web)

  1. Add html code to your page (and replace @ptkdev with your instagram username):
<instagram-widget username="@ptkdev" />
  1. Require javascript in yourpage (before </body>):
<script src="https://cdn.jsdelivr.net/npm/@ptkdev/webcomponent-instagram-widget@latest/dist/lib/en/instagram-widget.min.js"></script>

Options / Attributes

ParameterDescriptionValuesDefault valueAvailable since
usernameSet your instagram usernameYour instagram username with or without @@ptkdevv1.0.0
items-limitSet the max number of picturesnumber: from 0 to 129v1.1.0
gridSet grid aspect ratio1x1, 2x2, 3x3, etc... or responsiveresponsivev1.1.0
image-widthSet width of images (NOTE: grid different than responsive overwrite this value)length units: 100%, 100px, 100pt100%v1.1.0
image-heightSet height of imageslength units: 100%, 100px, 100100%v1.1.0
border-spacingSet spacing around imageslength units: 5%, 5px, 5pt2pxv2.1.0
border-cornersSet border radius of corners: 0: square / 15: rounded / 100: circlenumber: from 0 to 1005v2.1.0
cacheEnable/disable cacheenabled / disabledenabledv2.1.0

License

  • Code and Contributions have MIT License
  • Images and logos have CC BY-NC 4.0 License (Freepik Premium License)
  • Documentations and Translations have CC BY 4.0 License

Thanks! Leave a feedback!


Original Link: https://dev.to/ptkdev/instagram-widget-my-first-webcomponent-51ja

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To