baorv/lazyload

Lazyload integration for Yii2

Installs: 96

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:yii2-extension

dev-master 2018-04-14 03:04 UTC

This package is auto-updated.

Last update: 2024-11-06 16:37:19 UTC


README

This package provides lazyload widget for Yii2 Framework

Install

Run composer to install

composer require "baorv/lazyload":"*" 

Or define package in require section of composer.json

...
require: {
    ...
    "baorv/lazyload":"*"
    ...
},
...

Usage

You can use this widget in any view

use baorv\lazyload\widgets\Lazyload;

Lazyload::widget([
    'src' => 'your-image.png',
    'options' => [],
    'clientOptions' => [],
    'imageClass' => 'your-class'
])