PHPackages                             linusrendahl/social-fontawesome - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. linusrendahl/social-fontawesome

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

linusrendahl/social-fontawesome
===============================

PHP Class to generate social links with FontAwesome icons.

1.0.2(11y ago)123MITPHPPHP &gt;=5.4

Since Dec 15Pushed 11y ago1 watchersCompare

[ Source](https://github.com/linusrendahl/social-fontawesome)[ Packagist](https://packagist.org/packages/linusrendahl/social-fontawesome)[ Docs](http://liren.se)[ RSS](/packages/linusrendahl-social-fontawesome/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

social-fontawesome
==================

[](#social-fontawesome)

[![Build Status](https://camo.githubusercontent.com/69810c7d3bbae5c215b0496268b1ba400eb23b4429b5f04e08110c08fdbee63b/68747470733a2f2f7472617669732d63692e6f72672f6c696e757372656e6461686c2f736f6369616c2d666f6e74617765736f6d652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/linusrendahl/social-fontawesome)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/29fd2eabe8dce2efe4d41c393573df08565c2a04197d7b095cf0275a8a34a1bf/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c696e757372656e6461686c2f736f6369616c2d666f6e74617765736f6d652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/linusrendahl/social-fontawesome/?branch=master)

[![Code Coverage](https://camo.githubusercontent.com/fed71221bb72a9a58ecf1e2f3d9ec91fb82400f4e2ca6d697865f812785a5999/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c696e757372656e6461686c2f736f6369616c2d666f6e74617765736f6d652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/linusrendahl/social-fontawesome/?branch=master)

PHP Class to generate social links with FontAwesome icons.

\##Note This module does not add FontAwesome to your project. This will have to be added by yourself.

\##Installation Either download or use composer:

```
"require": {
        "linusrendahl/social-fontawesome": "1.*"
}
```

\##Basic usage Usage:

```
//create the object
$icons = new LinusRendahl\SocialFontAwesome;

//add some icons with the add method
$icons
	->add('http://www.facebook.com')
	->add('http://twitter.com')
	->add('http://instagram.com');

//get the html
$html = $icons->getHtml();
```

Returns:

```

```

\##Icons &amp; Social Networks supported by default

- Facebook
- Twitter
- Instagram
- GitHub
- LinkedIn
- Youtube
- Tumblr
- Vimeo

\##Methods ####add Add your URL to your social network with the add method. Use only if the social network is in the defaults listed above.

```
->add('http://facebook.com/user')
```

Returns:

```

```

\####addCustom If your link is not in the supported defaults, use this method to create your own.

```
//addCustom($url, $class, $title=null)
->addCustom('http://some-other-network.com/user', 'fa fa-some-icon', 'My title!')
```

Returns:

```

```

\####title Change the title for the default icons using this method.

```
->add('http://facebook.com/user')->title('Welcome to my Facebook page!')
```

Returns:

```

```

\####wrapper Add a HTML element to wrap around your icons.

```
->add('http://facebook.com/user')->wrapper('', '')
```

Returns:

```

```

\####setClass Add a custom class to the i element.

```
->add('http://facebook.com/user')->setClass('foobar')
```

Returns:

```

```

\####setClass Add a custom class to the i element.

```
->add('http://facebook.com/user')->setClass('foobar')
```

Returns:

```

```

\####getHtml Method to return the formatted HTML.

```
->getHtml()
```

\####getArray Method to return the raw array of icons to easily format with your own markup

```
->getArray()
```

\##Complete Example Usage:

```
//create the object
$icons = new LinusRendahl\SocialFontAwesome;

//add some icons with the add method
$icons
	->add('http://www.facebook.com')
	->add('http://twitter.com')->title('My Twitter Page!')
	->add('http://instagram.com')->title('Cool pictures!')->setClass('foobar')
	->wrapper('', '');

//get the html
$html = $icons->getHtml();

echo $html;
```

Returns:

```

```

\##History ####v1.0.2

- Added as a composer package at Packagist.

\####v1.0

- First release.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

4172d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a55e18ca488b9ac0f1b1f4cb3d5850ce794104554e6c44be6b24c861cb1ce89?d=identicon)[Liren](/maintainers/Liren)

---

Top Contributors

[![linusrendahl](https://avatars.githubusercontent.com/u/7011353?v=4)](https://github.com/linusrendahl "linusrendahl (28 commits)")

---

Tags

iconssocialFontAwesome

### Embed Badge

![Health badge](/badges/linusrendahl-social-fontawesome/health.svg)

```
[![Health](https://phpackages.com/badges/linusrendahl-social-fontawesome/health.svg)](https://phpackages.com/packages/linusrendahl-social-fontawesome)
```

###  Alternatives

[twbs/bootstrap-icons

Official open source SVG icon library for Bootstrap

7.9k2.0M56](/packages/twbs-bootstrap-icons)[simple-icons/simple-icons

SVG icons for popular brands

24.8k194.2k4](/packages/simple-icons-simple-icons)[davmixcool/php-sentiment-analyzer

PHP Sentiment Analyzer is a lexicon and rule-based sentiment analysis tool that is used to understand sentiments in a sentence using VADER (Valence Aware Dictionary and sentiment Reasoner).

138151.7k1](/packages/davmixcool-php-sentiment-analyzer)[codewithdennis/filament-lucide-icons

A Filament plugin that integrates Lucide icons, allowing you to use them seamlessly across Filament forms, tables, actions, and more.

4529.4k2](/packages/codewithdennis-filament-lucide-icons)[swissup/module-font-awesome

FontAwesome for Magento2

116.9k1](/packages/swissup-module-font-awesome)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
