Social Buttons and Brand Colors for Tailwind CSS
π¨ Live Demo Β· π Documentation
- π¨ 25 Providers β All major social platforms included
- π§© Tailwind CSS Native β First-class Tailwind CSS plugin with namespaced
tw-social-*classes - π¦ Modular Imports β Import only what you need, keep your bundle minimal
- π 4 Variants β Light, dark, outlined, and inverted button styles
- π§ Framework Agnostic β Works with React, Vue, Angular, Svelte, or plain HTML
- π― Any Icon Library β Compatible with Font Awesome, Material Icons, Ionicons, and more
- βΏ Accessible β Built-in focus and disabled states
- ποΈ Token-Driven β Full CSS variable contract for custom theming
npm install tailwindcss-socialyarn add tailwindcss-socialpnpm add tailwindcss-socialUse via jsDelivr β no installation required:
<!-- All social providers -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tailwindcss-social@1/css/all.min.css" />
<!-- Or load specific providers -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tailwindcss-social@1/css/single/github/github.min.css" />Import all providers or only the ones you need:
// All providers
import 'tailwindcss-social/css/all.min.css';
// Or import specific providers for smaller bundle size
import 'tailwindcss-social/css/single/github/github.min.css';
import 'tailwindcss-social/css/single/linkedin/linkedin.min.css';import tailwindcssSocial from 'tailwindcss-social';
export default {
plugins: [tailwindcssSocial()],
};Limit providers for a smaller footprint:
import tailwindcssSocial from 'tailwindcss-social';
export default {
plugins: [
tailwindcssSocial({
providers: ['github', 'linkedin', 'youtube'],
}),
],
};apple |
bitbucket |
discord |
dropbox |
facebook |
flickr |
foursquare |
github |
gitlab |
instagram |
linkedin |
microsoft |
odnoklassniki |
openid |
pinterest |
reddit |
slack |
soundcloud |
tumblr |
twitter |
vimeo |
vk |
x |
yahoo |
youtube |
<button class="tw-social-btn tw-social-provider-github">
<i class="fa-brands fa-github"></i>
<span>Continue with GitHub</span>
</button>
<button class="tw-social-btn tw-social-provider-github tw-social-variant-outline">
<i class="fa-brands fa-github"></i>
<span>Outlined</span>
</button><button class="tw-social-btn tw-social-provider-github tw-social-icon-only" aria-label="GitHub">
<i class="fa-brands fa-github"></i>
</button>| Class | Description |
|---|---|
.tw-social-variant-light |
Light variant |
.tw-social-variant-dark |
Dark variant |
.tw-social-variant-outline |
Outlined variant |
.tw-social-variant-inverted |
Inverted variant |
| Class | Description |
|---|---|
.tw-social-size-sm |
Small |
.tw-social-size-md |
Medium (default) |
.tw-social-size-lg |
Large |
| Class / Attribute | Description |
|---|---|
.tw-social-icon-only |
Icon-only button |
.tw-social-icon-left |
Icon on the left |
.tw-social-icon-right |
Icon on the right |
data-icon="inline-start" |
Logical inline start |
data-icon="inline-end" |
Logical inline end |
For each provider (e.g. github):
| Utility | Classes |
|---|---|
| Background | .tw-social-bg-github .tw-social-bg-github-light .tw-social-bg-github-dark |
| Text | .tw-social-text-github .tw-social-text-github-light .tw-social-text-github-dark |
| Border | .tw-social-border-github .tw-social-border-github-light .tw-social-border-github-dark |
| Ring | .tw-social-ring-github .tw-social-ring-github-light .tw-social-ring-github-dark |
| SVG Fill | .tw-social-fill-github .tw-social-fill-github-light .tw-social-fill-github-dark |
| SVG Stroke | .tw-social-stroke-github .tw-social-stroke-github-light .tw-social-stroke-github-dark |
π‘ Replace
githubwith any supported provider name.
Provider classes expose the following variables:
--tw-social-color
--tw-social-color-light
--tw-social-color-dark
--tw-social-on-colorButton runtime variables:
--tw-social-btn-bg
--tw-social-btn-fg
--tw-social-btn-border
--tw-social-btn-ringFull documentation with interactive examples is available at:
π aldi.github.io/tailwindcss-social
Contributions are welcome! Please read our Contributing Guide before submitting a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b new-provider) - Commit your changes (
git commit -m 'Add new provider') - Push to the branch (
git push origin new-provider) - Open a Pull Request
Released under the MIT License.
