yii2-webui-popover This widget is a Yii 2 wrapper of WebUI-Popover plugin.

Yii2 WebUI Popover

  1. Installation
  2. Usage

This widget is a Yii 2 wrapper of WebUI-Popover plugin.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist kit-tools/yii2-webui-popover "*"

or add

"kit-tools/yii2-webui-popover": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

use kittools\webuipopover\WebUIPopover;

echo WebUIPopover::widget([
    'label' => 'Button popup',
    'tagName' => 'button',
    'body' => 'Content popup'
]);

The following example will show the content enclosed between the begin() and end() calls within the popover box:

WebUIPopover::begin([
    'label' => 'Button popup',
    'tagName' => 'button',
    'tagOptions' => [
        'class' => 'btn btn-success',
    ],
    'pluginOptions' => [
        'placement' => 'right',
        'animation' => 'pop',
        'title' => 'Popover title',
        'onShow' => 'function($element) {console.log($element);}'
    ],
]);

echo 'Content popup';

WebUIPopover::end();

Checkout the documentation for further information.

1 0
3 followers
172 downloads
Yii Version: 2.0
License: GPL-3.0
Category: User Interface
Developed by: Sergey Zimoglyadov
Created on: Mar 15, 2016
Last updated: 2 years ago

Downloads

show all

Related Extensions