johnsnook/yii2-bootstrap4-card

It's an amazing widget that encapsulates bootstrap cards.

Installs: 193

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

pkg:composer/johnsnook/yii2-bootstrap4-card

dev-master 2018-08-08 15:46 UTC

This package is not auto-updated.

Last update: 2025-10-07 22:37:56 UTC


README

It's a widget that encapsulates bootstrap cards.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist johnsnook/yii2-bootstrap4-card "*"

or add

"johnsnook/yii2-bootstrap4-card": "*"

to the require section of your composer.json file.

Usage

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

<?php                                                                            
     echo Card::widget([                        
        'headerOptions' => ['class' => 'bg-secondary'],
        'title' => 'Top card',                   
        'body' => $aBunchOfHtml,                 
     ]);
	/* OR */
     echo Card::begin([                         
        'containerOptions' => ['class' => 'border border-secondary'],
        'headerOptions' => ['class' => 'bg-dark text-white'],
        'title' => 'Top card',
 	]);
?>                                                                              <p class="card-text">                      
 <?= echo CardlWidget::end();

. . . . . . . . . . .