PHPackages                             stratoss/yii2-gridster - 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. stratoss/yii2-gridster

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

stratoss/yii2-gridster
======================

Gridster.js widget for Yii2

v2.0.7(10y ago)017MITPHP

Since Apr 25Pushed 10y ago1 watchersCompare

[ Source](https://github.com/stratoss/yii2-gridster)[ Packagist](https://packagist.org/packages/stratoss/yii2-gridster)[ RSS](/packages/stratoss-yii2-gridster/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (6)Dependencies (3)Versions (10)Used By (0)

Gridster.js widget for Yii2
===========================

[](#gridsterjs-widget-for-yii2)

This extension provides the [Gridster.js](https://github.com/ducksboard/gridster.js) integration for the Yii2 framework.

[![Latest Stable Version](https://camo.githubusercontent.com/a5e3d6b380ebbda6a546cbce7e594a75c5fa954d942f5ca4c325006e953212de/68747470733a2f2f706f7365722e707567782e6f72672f666564656d6f7474612f796969322d67726964737465722f762f737461626c65)](https://packagist.org/packages/fedemotta/yii2-gridster) [![Total Downloads](https://camo.githubusercontent.com/5adfdb9bb931d1fef18abb8849ce5a92ade823ca4be72fb586ed5cbe6ef599fe/68747470733a2f2f706f7365722e707567782e6f72672f666564656d6f7474612f796969322d67726964737465722f646f776e6c6f616473)](https://packagist.org/packages/fedemotta/yii2-gridster) [![Latest Unstable Version](https://camo.githubusercontent.com/a077a12b2dfcaa699e48b93b45525c5c1d08cf03f2cda25153dda893ec530132/68747470733a2f2f706f7365722e707567782e6f72672f666564656d6f7474612f796969322d67726964737465722f762f756e737461626c65)](https://packagist.org/packages/fedemotta/yii2-gridster) [![License](https://camo.githubusercontent.com/37bba4109a2720d7eb602c72f03828c033281c07195fca1bede8c2582bdb1ed5/68747470733a2f2f706f7365722e707567782e6f72672f666564656d6f7474612f796969322d67726964737465722f6c6963656e7365)](https://packagist.org/packages/fedemotta/yii2-gridster)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist stratoss/yii2-gridster "*"

```

or add

```
"stratoss/yii2-gridster": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Use Gridster.js as any other other Yii2 widget.

```
use stratoss\gridster\Gridster;
```

```
$gridster = Gridster::begin([
    'options'=>['class'=>'gridster'],
    'clientOptions'=>[
        'widget_margins'=> [10, 10],
        'widget_base_dimensions'=> [140, 140],
        'autogrow_cols'=> false,
        'resize'=>['enabled'=>true]
    ]
]);?>

    Some text
    The widget content

    Some other text
    The other widget content
