PHPackages                             nirvana-msu/yii2-pinterest-widgets - 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. nirvana-msu/yii2-pinterest-widgets

AbandonedArchivedYii2-extension[Utility &amp; Helpers](/categories/utility)

nirvana-msu/yii2-pinterest-widgets
==================================

Yii2 extension for pinterest widgets

259PHP

Since Aug 12Pushed 9y ago1 watchersCompare

[ Source](https://github.com/nirvana-msu/yii2-pinterest-widgets)[ Packagist](https://packagist.org/packages/nirvana-msu/yii2-pinterest-widgets)[ RSS](/packages/nirvana-msu-yii2-pinterest-widgets/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-pinterest-widgets
======================

[](#yii2-pinterest-widgets)

Yii2 extension for [pinterest widgets](https://developers.pinterest.com/docs/widgets/getting-started/), making it easy to add Pinterest content onto your website.

Resources
---------

[](#resources)

- Yii2 [extension page](http://www.yiiframework.com/extension/yii2-pinterest-widgets)
- Pinterest [widget builder](https://business.pinterest.com/widget-builder/)

Installation
------------

[](#installation)

### Composer

[](#composer)

Add extension to your `composer.json` and update your dependencies as usual, e.g. by running `composer update`

```
{
    "require": {
        "nirvana-msu/yii2-pinterest-widgets": "1.0.*@dev"
    }
}
```

[![](https://raw.githubusercontent.com/pinterest/react-pinterest/master/examples/images/demo.png)](https://raw.githubusercontent.com/pinterest/react-pinterest/master/examples/images/demo.png)

The full list of available widgets are:

- Pin It Button
- Pinterest Follow Button
- Pinterest Pin Widget
- Pinterest Profile Widget
- Pinterest Board Widget

Pin It Button
-------------

[](#pin-it-button)

The Pin It button is the best way for your business to get content on Pinterest. With just one click, visitors can save content they like on your site to Pinterest, which helps even more Pinners discover you.

proptypedefaultnotestypestring'any'enum of \['any', 'one'\]largeboolean*not set* (false)is large sized buttonroundboolean*not set* (false)is circular buttonThe following props are specific for type="one". Each prop refers to the Pin to be pinned on click. A new Pin will be created using `media`, `url` and `description`.

proptypenotesmediastringthe image url of the Pin to createurlstringthe link back of the Pin to createdescriptionstringthe description of the Pin to create> Note: there are more settings available than this widget currently supports. For the full description of the settings, defaults and their effect, refer to [documentation](https://developers.pinterest.com/docs/widgets/save/).

Use:

```
// To create a Pin one Pin It button
echo PinItButton::widget([
    'type' => 'one',
    'media' => 'https://goo.gl/zFFBUK',
    'url' => 'https://goo.gl/hQmcWP',
    'description' => 'Example Stuff',
]);

// To Create a Pin any Pin It Button: opens the image picker overlay
echo PinItButton::widget(['type' => 'any']);
echo PinItButton::widget(['type' => 'any', 'large' => true]);
echo PinItButton::widget(['type' => 'any', 'round' => true]);
echo PinItButton::widget(['type' => 'any', 'round' => true, 'large' => true]);
```

Pinterest Follow Button
-----------------------

[](#pinterest-follow-button)

The follow button lets Pinners easily follow your business’s Pinterest page.

proptypenotesboardstringthe board slug of the board to follow (`/`)userstringthe username of the user to followtextstringthe text to be displayed on the follow buttonChoose either a `board` or `user` to follow. If both are specified, `board` will be used.

Use:

```
// To create a board follow button
echo PinterestFollowButton::widget([
    'board' => 'pinterest/official-news',
    'text' => 'Official News',
]);

// To create a profile follow button
echo PinterestFollowButton::widget([
    'user' => 'pinterest',
    'text' => 'Pinterest',
]);
```

Pinterest Pin Widget
--------------------

[](#pinterest-pin-widget)

Pin widget lets you show a Pin and is perfect for when you find a Pin that fits your look and feel.

proptypedefaultnotespinstring*required*the id of the Pin to displaysizestring*not set* ('small')enum of \['small', 'medium', 'large'\]terseboolean*not set* (false)whether to hide descriptionUse:

```
// Pin Widgets default to small
echo PinterestPin::widget(['pin' => '530158187357124374']);
echo PinterestPin::widget(['pin' => '530158187357124374', 'size' => 'medium']);
echo PinterestPin::widget(['pin' => '530158187357124374', 'size' => 'large', 'terse' => true]);
```

Pinterest Board Widget
----------------------

[](#pinterest-board-widget)

Board widget displays an entire board (up to 50 Pins), providing your visitors a quick taste of what your Pinterest profile's all about.

proptypedefaultnotesboardstring*required*the board slug of the board (`/`)boardWidthnumber*not set*the width of the board widgetboardHeightnumber*not set*the height of the board widgetimageWidthnumber*not set*the width of the Pin thumbnails within the widgetUse:

```
echo PinterestBoard::widget([
    'board' => 'pinterest/official-news',
    'boardWidth' => 400,
    'boardHeight' => 320,
    'imageWidth' => 80,
]);
```

Pinterest Profile Widget
------------------------

[](#pinterest-profile-widget)

Profile widget shows the most recent Pins you’ve saved.

proptypedefaultnotesuserstring*required*the username of the profileboardWidthnumber*not set*the width of the board widgetboardHeightnumber*not set*the height of the board widgetimageWidthnumber*not set*the width of the Pin thumbnails within the widgetUse:

```
echo PinterestProfile::widget([
    'user' => 'pinterest',
    'boardWidth' => 400,
    'boardHeight' => 320,
    'imageWidth' => 80,
]);
```

\##License

Extension is released under MIT license.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a1a5dd972c2dcc6866be80df680b326649a14e85dd1586af5a8fbf46e9471d0c?d=identicon)[nirvana-msu](/maintainers/nirvana-msu)

---

Top Contributors

[![nirvana-msu](https://avatars.githubusercontent.com/u/5787387?v=4)](https://github.com/nirvana-msu "nirvana-msu (3 commits)")

### Embed Badge

![Health badge](/badges/nirvana-msu-yii2-pinterest-widgets/health.svg)

```
[![Health](https://phpackages.com/badges/nirvana-msu-yii2-pinterest-widgets/health.svg)](https://phpackages.com/packages/nirvana-msu-yii2-pinterest-widgets)
```

PHPackages © 2026

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