scriptex-socials

A native web component: links to various social media with SVG icons support

Usage no npm install needed!

<script type="module">
  import scriptexSocials from 'https://cdn.skypack.dev/scriptex-socials';
</script>

README

GitHub release GitHub issues GitHub last commit Build Status npm npm Analytics

Atanas Atanasov's Socials

Links to various social media

This is a native web component built with TypeScript, with no dependencies, which lists links to various social medias.

Install

npm i scriptex-socials

# or

yarn add scriptex-socials

Usage

In your JavaScript/TypeScript entry point:

import 'scriptex-socials';

You can also include the web component directly from unpkg.com:

import('https://unpkg.com/scriptex-socials');

or

<script async src="https://unpkg.com/scriptex-socials"></script>

Then add the component in your HTML/JSX markup:

<social-links></social-links>

<!-- or with custom color -->

<social-links style="color: red;"></social-links>

<div style="background: black;">
    <social-links style="color: white;"></social-links>
</div>

React with TypeScript

If you're using React with TypeScript, you need to extends the JSX IntrinsicElements interface so TypeScript knows that the social-links element exists.

You can do so in a custom.d.ts file in your project's root folder. Don't forget to add that file in your tsconfig.json!

declare namespace JSX {
    interface IntrinsicElements {
        'social-links': any;
    }
}

Contents

Currently it includes the following:

Support this project

Tweet Donate on PayPal Become a Patron Buy Me A Coffee Donate on Liberapay Donate on Issuehunt

LICENSE

MIT