PHPackages                             half/yii2-picnic - 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. half/yii2-picnic

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

half/yii2-picnic
================

25.5k↓33.3%1[1 PRs](https://github.com/half22/yii2-picnic/pulls)JavaScript

Since May 1Pushed 9mo ago2 watchersCompare

[ Source](https://github.com/half22/yii2-picnic)[ Packagist](https://packagist.org/packages/half/yii2-picnic)[ RSS](/packages/half-yii2-picnic/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Picnic
======

[](#picnic)

Picnic is a small and easy to use JavaScript framework.

How does it work?

```

	Change color

```

Controller:

```
function Car()
{
	picnic.controller.call(this);

	this.elements = ['name', 'colorButton'];
	this.attributes = ['color'];
}

$.extend(Car.prototype, picnic.controller.prototype,
{
	init: function()
	{
	},

	bindEvents: function ()
	{
		this.on('click', this.elements.colorButton, this.changeColor);

		//delay
		//this.on('click', this.elements.colorButton, [this.changeColor, 100]);

		//propagate default event
                //this.on('click', this.elements.colorButton, this.changeColor, true);
	},

	setName: function (name)
	{
		this.elements.name.html(name);
	},

	changeColor: function ()
	{
		this.elements.name.css('color', this.attributes.color);
	}
});
```

Start Picnic:

```
$(document).ready(function () {

	picnic.start();

	//access controller
	$('#car').getController().setName('Audi Q8');
});
```

Plugins
-------

[](#plugins)

```
Change color
```

Available plugins:

- clicked
- dropdown
- form-submit-button
- lazy-load
- scroll-to
- sticky
- tabs
- title-bubble
- bubble (tooltip)

Other components
----------------

[](#other-components)

```
//locale
picnic.locale.messages = {
	'hotel': ['{n} hotel', '{n} hotely', '{n} hotelov'],
	'text': 'Hello {name}'
};
picnic.locale.t('text', {name: 'picnic'});
picnic.locale.t('hotel', 5);
picnic.locale.t('hotel', {n: 5});

//router
picnic.router.rules = {
	'url': '/admin/url'
};
picnic.router.getUrl('url');
picnic.router.getUrl('url', {param: value});

//url
picnic.url.queryStringToJson();
picnic.url.current([param: value]);

//scrollbar
picnic.scrollbar.disable();
picnic.scrollbar.enable();

//backdrop
picnic.backdrop.open();
picnic.backdrop.close();

//events
picnic.event.on('picnic.event.test', function(event, params) { } );
picnic.event.trigger('picnic.event.test', {name: 'value'});

picnic.event.on('picnic.event.test', $('#target'), function(event, params) { } );
picnic.event.trigger('picnic.event.test', $('#target'), {name: 'value'});

//utils
$('body').findElement('elementName');
$('body').closestElement('elementName');
$('body').findController('controllerName');
$('body').findController('controllerName').initController();
$('body').findController('controllerName').getController();
$('body').findController('controllerName').getController().refresh();
picnic.initControllers();
```

Quick event binding in HTML
---------------------------

[](#quick-event-binding-in-html)

Sytnax:

```

```

Example:

```
Close
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance41

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 88% 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://avatars.githubusercontent.com/u/219741?v=4)[Jérémy Guéry](/maintainers/half)[@Half](https://github.com/Half)

---

Top Contributors

[![half22](https://avatars.githubusercontent.com/u/6659100?v=4)](https://github.com/half22 "half22 (88 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (10 commits)")[![yuniorsk](https://avatars.githubusercontent.com/u/1545539?v=4)](https://github.com/yuniorsk "yuniorsk (2 commits)")

### Embed Badge

![Health badge](/badges/half-yii2-picnic/health.svg)

```
[![Health](https://phpackages.com/badges/half-yii2-picnic/health.svg)](https://phpackages.com/packages/half-yii2-picnic)
```

###  Alternatives

[tga/simhash-php

SimHash similarities algorithm implementation for PHP 5.3

15243.5k1](/packages/tga-simhash-php)[elaniin/findable

An SEO add-on for Statamic.

131.4k](/packages/elaniin-findable)

PHPackages © 2026

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