PHP code example of xj / yii2-mosaic-widget

1. Go to this page and download the library: Download xj/yii2-mosaic-widget library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

xj / yii2-mosaic-widget example snippets


use xj\mosaic\Mosaic;
Mosaic::widget(['selector' => '.circle', 'options' => ['opacity' => 0.8]]);
Mosaic::widget(['selector' => '.fade']);
Mosaic::widget(['selector' => '.bar', 'options' => ['animation' => 'slide']]);
Mosaic::widget(['selector' => '.bar2', 'options' => ['animation' => 'fade']]);
Mosaic::widget(['selector' => '.bar3', 'options' => [
        'animation' => 'slide',
        'anchor_y' => 'top'
]]);
Mosaic::widget(['selector' => '.cover', 'options' => [
        'animation' => 'slide',
        'anchor_x' => '400px'
]]);
Mosaic::widget(['selector' => '.cover2', 'options' => [
        'animation' => 'slide',
        'anchor_y' => 'top',
        'hover_y' => '80px'
]]);
Mosaic::widget(['selector' => '.cover3', 'options' => [
        'animation' => 'slide',
        'anchor_x' => '400px',
        'hover_y' => '300px'
]]);