PHPackages                             aayaresko/yii2-widget-timer - 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. aayaresko/yii2-widget-timer

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

aayaresko/yii2-widget-timer
===========================

Yii2 widget that displays controllable timer/stopwatch

v1.1(10y ago)112.6k↓35.7%2BSD 3-Clause LicenseJavaScriptPHP &gt;=5.3.0

Since May 8Pushed 8y ago1 watchersCompare

[ Source](https://github.com/aayaresko/yii2-widget-timer)[ Packagist](https://packagist.org/packages/aayaresko/yii2-widget-timer)[ Docs](https://github.com/aayaresko/yii2-widget-timer)[ RSS](/packages/aayaresko-yii2-widget-timer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

yii2-widget-timer
=================

[](#yii2-widget-timer)

Simple timer widget for yii2-based applications

Widget timer on jquery plugin.
------------------------------

[](#widget-timer-on-jquery-plugin)

Displays time elapsed since timer started in format HH:MM:SS:

- HH - elapsed hours;
- ММ - elapsed minutes;
- CC - elapsed seconds; It can run automatically (after page is load) or manually. It is possible to stop and reset the timer.

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

[](#installation)

The preferred way to install extension is via [composer](http://getcomposer.org/download/). Check the [composer.json](https://github.com/aayaresko/yii2-widget-timer/blob/master/composer.json) for this extension's requirements and dependencies.

To install, either run

```
$ php composer.phar require aayaresko/yii2-widget-timer "*"

```

or add

```
"aayaresko/yii2-widget-timer": "*"

```

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

Usage
-----

[](#usage)

Upload all necessary components and prepare widget

```
use aayaresko\timer\Timer
Timer::widget([
    'options' => [
        'container' => '.timer',
        'autoStart' => true,
    ]
])
```

Add an html tag with class name 'timer' in any place of your html. Content of this tag will be replaced by widget.

```

```

Working copy of plugin will be in global scope and can be controlled via $.fn.timer.worker. Timer will run automatically after initialization (if 'autoStart' parameter is specified) and assigned to a container with class 'timer' ('container' property).

Run the timer

```
    $.fn.timer.worker.go();
```

Plugin configuration:

- container - html selector of timer container element (default - '.timer');
- autoStart – whether to start timer automatically after initialization (default - true);
- hours – start hours count from this value (default '00');
- minutes – start minutes count from this value (default '00');
- seconds – start seconds count from this value (default '00');
- animate - whether to run animation when timer starts (blinking);
- animationSpeed - speed of animation;
- animationTimes - number of blinking;

Plugin control:

- init(value) - initialize the timer, only displays the timer (value == false) or run timer automatically (value == true), if timer is already running this actions will stop the timer and reset all of its counters (hours, minutes, seconds);
- go() - run the timer;
- stop(value) - stop the timer and keep counters (hours, minutes, seconds) (value == false) or reset them (value == true);
- flush() - reset the timer counters (hours, minutes, seconds).
- timeAsString() - return the current time values as string.

License
-------

[](#license)

**yii2-widget-timer** is released under the BSD 3-Clause License. See the bundled `LICENSE.md` for details.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

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.

###  Release Activity

Cadence

Every ~354 days

Total

2

Last Release

3674d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/06e7bed9064a58e5e46fb881990859f810313aa291b4000310f3a36de3b2d22a?d=identicon)[aayaresko](/maintainers/aayaresko)

---

Top Contributors

[![aayaresko](https://avatars.githubusercontent.com/u/8190713?v=4)](https://github.com/aayaresko "aayaresko (54 commits)")

---

Tags

pluginjquerytimeryii2extensioncounterwidgetstopwatch

### Embed Badge

![Health badge](/badges/aayaresko-yii2-widget-timer/health.svg)

```
[![Health](https://phpackages.com/badges/aayaresko-yii2-widget-timer/health.svg)](https://phpackages.com/packages/aayaresko-yii2-widget-timer)
```

###  Alternatives

[kartik-v/yii2-widget-datepicker

Enhanced Yii2 wrapper for the bootstrap datepicker plugin (sub repo split from yii2-widgets).

1097.0M60](/packages/kartik-v-yii2-widget-datepicker)[kartik-v/yii2-widget-datetimepicker

Enhanced Yii2 wrapper for the bootstrap datetimepicker plugin (sub repo split from yii2-widgets)

1036.5M47](/packages/kartik-v-yii2-widget-datetimepicker)[kartik-v/yii2-widget-typeahead

Enhanced Yii2 wrapper for the Twitter Typeahead plugin (sub repo split from yii2-widgets).

454.8M9](/packages/kartik-v-yii2-widget-typeahead)[kartik-v/yii2-widget-rating

A Yii2 widget for the simple yet powerful bootstrap-star-rating plugin with fractional rating support (sub repo split from yii2-widgets)

444.1M8](/packages/kartik-v-yii2-widget-rating)[kartik-v/yii2-widget-timepicker

Enhanced Yii2 wrapper for the bootstrap timepicker plugin (sub repo split from yii2-widgets)

404.9M14](/packages/kartik-v-yii2-widget-timepicker)[kartik-v/yii2-widget-sidenav

An enhanced side navigation menu styled for bootstrap (sub repo split from yii2-widgets)

364.0M8](/packages/kartik-v-yii2-widget-sidenav)

PHPackages © 2026

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