Easy to use social media button collection with Vue.js or HTML & CSS integration
MIT License
Light Mode
Dark Mode
Here is a list of frameworks/libraries used to develop Awesome Social Button
Learn what is required before using Awesome Social Button and how to install it quickly. Let's get started!
This is created based on Vite + Vue3 + TypeScript so you will need to install this lib inside Vue3 project. Vue2 may be supported but it has not been fully tested yet.
Additionally, you will need to install brand icons from the latest version of Font Awesome.
Note: You may use this library with only HTML & CSS. Please visit our demo to implement right away.
There are a few ways you can install Awesome Social Button, namely npm, yarn and pnpm. If you install via npm, here is a single cmd to install this library
npm install awesome-social-button
yarn add awesome-social-button
pnpm add awesome-social-button
VueJS usage example
VueJS without composition API
<template>
<div id="app">
<awesome-social-button
type="facebook"
:link="{ src: 'https://facebook.com'}"
/>
</div>
</template>
<script>
import { AwesomeSocialButton } from 'awesome-social-button'
export default {
components: {
AwesomeSocialButton,
},
}
</script>
VueJS with composition API
<script setup>
import { AwesomeSocialButton } from 'awesome-social-button'
</script>
<template>
<div id="app">
<AwesomeSocialButton
type="facebook"
:link="{ src: 'https://facebook.com'}"
/>
</div>
</template>
Note: At the moment, the social icons are fixed at 10. For each social icon, there is a default background color which can be changed.
Here are the attributes of that you can set
Prop | Type | Required | Description |
---|---|---|---|
type |
facebook |twitter |tiktok |instagram |linkedin |youtube |google |pinterest |snapchat |whatsapp
|
Yes | 10 Social media icons that can be used. |
link |
object |
Yes | Show link of a button when it is clicked{ href: string; target?: AnchorHTMLAttributes["target"] } |
shape |
circle |square
|
Optional | Button shape. The default value is circle . |
dark |
boolean |
Optional | Turn on dark mode. The default value is FALSE. |
width |
number |
Optional | The dimension of a button. The default value is 40. |
color |
string |
Optional | The background color of a button, and if it's not specified, the button will use the default brand color. |
tooltip |
string |
Optional | Show or hide a tooltip message |
Distributed under the MIT License. See LICENSE
for more information.
Free Font Awesome icons are licensed under CC BY 4.0 License while fonts are licensed under SIL OFL 1.1 License. Click here for more information.