PHPackages                             singularity/yii2-dropzoneinput - 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. [Templating &amp; Views](/categories/templating)
4. /
5. singularity/yii2-dropzoneinput

ActiveYii2-extension[Templating &amp; Views](/categories/templating)

singularity/yii2-dropzoneinput
==============================

Dropzone Input for Yii2 framework

1.0(6y ago)0146[1 PRs](https://github.com/singularity-is/yii2-dropzoneinput/pulls)BSD-3-ClauseJavaScript

Since May 6Pushed 2y ago3 watchersCompare

[ Source](https://github.com/singularity-is/yii2-dropzoneinput)[ Packagist](https://packagist.org/packages/singularity/yii2-dropzoneinput)[ Docs](https://github.com/singularity-is/yii2-dropzoneinput)[ RSS](/packages/singularity-yii2-dropzoneinput/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (7)Versions (3)Used By (0)

Dropzone Input Widget for Yii2
==============================

[](#dropzone-input-widget-for-yii2)

[![Latest Version](https://camo.githubusercontent.com/7a85c473135984abc51441e4e4a3b097285d477f00205b9215cdea62a37acfe6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f73696e67756c61726974792d69732f796969322d64726f707a6f6e65696e7075742e7376673f7374796c653d666c61742d737175617265266c6162656c3d72656c65617365)](https://github.com/singularity-is/yii2-dropzoneinput/tags)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/100a8ed9805211e898d6e7688f11a028414d5fb8f67229ae71bc5c7e5f4aaf75/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f73696e67756c61726974792f796969322d64726f707a6f6e65696e7075742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/singularity/yii2-dropzoneinput)[![Coverage Status](https://camo.githubusercontent.com/e12d64329dd05cd9ff790356181c7e7d672735b0065311acafbb9727a62e3aa2/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f73696e67756c61726974792f796969322d64726f707a6f6e65696e7075742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/singularity/yii2-dropzoneinput/code-structure)[![Quality Score](https://camo.githubusercontent.com/bae4449811f7c57dcb426fffdd681fc49ced951dd1cbdc8fddaad70dd64f4878/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f73696e67756c61726974792f796969322d64726f707a6f6e65696e7075742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/singularity/yii2-dropzoneinput)[![Total Downloads](https://camo.githubusercontent.com/5b20c1ddbfdf68e6bb2a960ebbff4fe3701d5f69594d01123cc927714aade0e4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73696e67756c61726974792f796969322d64726f707a6f6e65696e7075742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/singularity/yii2-dropzoneinput)

Renders a [Dropzone Input](http://www.dropzone.js) widget.

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

[](#installation)

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

Either run

```
$ composer require singularity/yii2-dropzoneinput:~1.0
```

or add

```
"singularity/yii2-dropzoneinput": "~1.0"

```

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

Usage
-----

[](#usage)

Using with ActiveForm

```
use singularity\dropzoneinput\DropzoneInput;

...

```

Using without ActiveForm

```
use singularity\dropzoneinput\DropzoneInput;

...

```

Options
-------

[](#options)

#### Preload Files

[](#preload-files)

Example:

```
[
    'files' => $files // default empty
]

```

Expected file format:

```
$file = [
    'id' => 100,
    'name' => 'My image',
    'size' => 5,
    'status' => 'success',
    'url' => Url::to(['/image/view', 'id' => 100, 'spec' => 'w120']), // dropzone thumbnail image url
    'src' => Url::to(['/image/view', 'id' => 100, 'spec' => 'w1200']) // full preview image url
];

```

#### Highlight First Item

[](#highlight-first-item)

Example:

```
[
    'highlightFirst' => true // default false
]

```

#### Enable Rotation

[](#enable-rotation)

Example:

```
[
    'enableRotate' => true // default false
    'clientOptions' => [
        'rotateUrl' => Url::to(['/image/rotate'])
    ]
]

```

#### Enable Preview

[](#enable-preview)

Example:

```
[
    'enablePreview' => true // default false
]

```

#### Enable Sort

[](#enable-sort)

Example:

```
[
    'enableSort' => true // default true
]

```

#### Enable Crop

[](#enable-crop)

Example:

```
[
    'enableCrop' => true // default false,
    'cropperOptions' => [
        'aspectRatio' => 1.4
    ],
    'clientOptions' => [
        'parallelUploads' => 1 // default 2 (it is recommended to set this to 1 when using crop)
    ],
    'beforeCrop' => new JsExpression("function() {
        console.log('Just before image is cropped!');
    }"),
]

```

#### Custom Remove Message

[](#custom-remove-message)

Example:

```
[
    'removeMessage' => 'Are you sure you want to delete image?' //this is the default
]

```

see [Cropper.JS](https://github.com/fengyuanchen/cropperjs/blob/master/README.md) for full documentation

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Dositej Grbovic](https://dositej-dev.com)
- [All Contributors](https://github.com/singularity-is/yii2-dropzoneinput/graphs/contributors)

License
-------

[](#license)

The BSD License (BSD). Please see [License File](LICENSE.md) for more information.

[![](https://camo.githubusercontent.com/b2386d186828d39e5f401fe1a45928ff42670d97e6bf663f60ec822c111ac9fd/687474703a2f2f7777772e67726176617461722e636f6d2f6176617461722f38363633643438656136303933643263653931373231376365656361316363322e706e67)](https://singularity.is)
*\#InventTomorrow*
[www.singularity.is](https://www.singularity.is)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98% 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

Unknown

Total

1

Last Release

2204d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4145d6805fbd31552d7fc6c045a158f3031e1090a83d2e176493adae346e13ca?d=identicon)[dzona](/maintainers/dzona)

![](https://avatars.githubusercontent.com/u/42881297?v=4)[Фондација Фласник](/maintainers/dositej)[@dositej](https://github.com/dositej)

---

Top Contributors

[![dositejg](https://avatars.githubusercontent.com/u/17592230?v=4)](https://github.com/dositejg "dositejg (48 commits)")[![vprorok](https://avatars.githubusercontent.com/u/942045?v=4)](https://github.com/vprorok "vprorok (1 commits)")

---

Tags

yii2widgetyiiinputyii 2dropzonesingularitysingularity solutiondropzoneinput

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/singularity-yii2-dropzoneinput/health.svg)

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

###  Alternatives

[vova07/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

243979.7k40](/packages/vova07-yii2-imperavi-widget)[artkost/yii2-trumbowyg

The Trumbowyg WYSIWYG Editor widget for yii2 framework

2418.3k](/packages/artkost-yii2-trumbowyg)

PHPackages © 2026

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