npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

social-login-buttons

v0.0.4

Published

Stencil Component Starter

Downloads

124

Readme

Social Login Buttons (Web Component)

social-login-buttons is a light weight and simple Web Component to display Social Login Buttons in your Angular, React, VueJS or Vanilla JS project.

DEMO

Coming Soon

Why is social-login-button the best choice for your project?

There are plenty of other packages that display social login buttons but our packkage offers following features.

  1. One Component for all Platforms. social-login-component is a web component, it works on all platforms including Angular, React, Vue Js and Vanilla Javascript
  2. Lightweight and easy to implement.
  3. Fully customizable. Using props, You can set the button to use Material UI design, and remove animation with a minimum code changes.

Install

npm

npm install social-login-buttons

yarn

yarn add social-login-buttons

Usage

React Social Login


First of all, import the package into your class file

import { applyPolyfills, defineCustomElements } from ‘social-login-buttons/loader’;

After imports, insert this code outside of your class declaration

applyPolyfills().then(() => {
   defineCustomElements(window);
});

Currently we are only providing 3 login buttons but dont worry more buttons are coming soon. (yay) To add the button to you page just add the following line where you want the button.

Google Login Button
<google-login> </google-login>
Facebook Login Button
<facebook-login> </facebook-login>
Github Login Button
 <github-login> </github-login>

Customization

By default the buttons display their own text however you can change thme to say whatever you want.

<facebook-login text={'Anything you write here will be the button text'} ></facebook-login>

By default Login Buttons are animated on hover. You can remove the animation by setting animation to false. For example,

<facebook-login animation={false} ></facebook-login>

By default the buttons use custom styling it can be changed to material ui design by setting variant to material

<facebook-login variant={‘material’} ></facebook-login>

Angular Social Login


In your project directory navigate to app.module.ts and do the following.

  1. Import' CUSTOM_ELEMENTS_SCHEMA from @angular/core. Add this to the line where you are importing NGModule.
  2. Edit you NGModule to set CUSTOM_ELEMENTS_SCHEMA in your schemas

Previously your app.module.ts file looked like this

import { BrowserModule } from “@angular/platform-browser”;
import { NgModule} from “@angular/core”;
import { AppRoutingModule } from “./app-routing.module”;
import { AppComponent } from “./app.component”;
import { <YourComponentName>} from “./stencil-test/your-component-name”;
@NgModule({
 declarations: [AppComponent, <YourComponentName>],
 imports: [BrowserModule, AppRoutingModule],
 providers: [],
 bootstrap: [AppComponent]
})
export class AppModule {}

Now your app.module.ts file should look like this

import { BrowserModule } from “@angular/platform-browser”;
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from “@angular/core”;
import { AppRoutingModule } from “./app-routing.module”;
import { AppComponent } from “./app.component”;
import { StencilTestComponent } from “./stencil-test/stencil-test.component”;
@NgModule({
 declarations: [AppComponent, StencilTestComponent],
 imports: [BrowserModule, AppRoutingModule],
 providers: [],
 schemas: [CUSTOM_ELEMENTS_SCHEMA],
 bootstrap: [AppComponent]
})
export class AppModule {}

Navigate to your component's typescript file and import the package.

import { applyPolyfills, defineCustomElements } from ‘social-login-buttons/loader’;

After imports, insert this code outside of your class declaration

applyPolyfills().then(() => {
   defineCustomElements(window);
});

Now navigate to your component's HTML file and simply add the following line where you want to add the component.

Google Login Button
<google-login> </google-login>
Facebook Login Button
<facebook-login> </facebook-login>
Github Login Button
 <github-login> </github-login>

Customization

By default the buttons display their own text however you can change thme to say whatever you want.

<facebook-login text={'Anything you write here will be the button text'} ></facebook-login>

By default Login Buttons are animated on hover. You can remove the animation by setting animation to false. For example,

<facebook-login animation={false} ></facebook-login>

By default the buttons use custom styling it can be changed to material ui design by setting variant to material .

<facebook-login variant={‘material’} ></facebook-login>

Contribution

Issues and pull requests are welcome at https://github.com/hileets/social-login-buttons